Skip to contentSkip to conversation

master - dmfilemapd: cast sysconf() return value to int

PATCH Bryn Reeves 1 participant 1 message Mar 30, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=bfc880994c80a798f28d51558ee120f70d65dd0f
Commit:        bfc880994c80a798f28d51558ee120f70d65dd0f
Parent:        76b6cbea60b6af6a89d3fc40486486c97df28fcc
Author:        Bryn M. Reeves <[email protected]>
AuthorDate:    Wed Mar 29 20:28:43 2017 +0100
Committer:     Bryn M. Reeves <[email protected]>
CommitterDate: Thu Mar 30 09:57:58 2017 +0100

dmfilemapd: cast sysconf() return value to int

---
 daemons/dmfilemapd/dmfilemapd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
daemons/dmfilemapd/dmfilemapd.c +1 -1
index 2c80d42..3e691e8 100644
@@ -660,7 +660,7 @@ static int _daemonise(struct filemap_monitor *fm)
 		}
 	}
 
-	for (fd = sysconf(_SC_OPEN_MAX) - 1; fd > STDERR_FILENO; fd--) {
+	for (fd = (int) sysconf(_SC_OPEN_MAX) - 1; fd > STDERR_FILENO; fd--) {
 		if (fd == fm->fd)
 			continue;
 		close(fd);