mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
coverity: checked_return of close
Check (or make quiet) close() ret code. NOTE: there is another duplicated code of daemonize function which should be converted to libdaemon.
This commit is contained in:
parent
b90014addc
commit
a533892cd3
@ -662,11 +662,11 @@ static int _daemonise(struct filemap_monitor *fm)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: Use libdaemon/server/daemon-server.c _daemonise() */
|
||||
for (fd = (int) sysconf(_SC_OPEN_MAX) - 1; fd > STDERR_FILENO; fd--) {
|
||||
if (fd == fm->fd)
|
||||
continue;
|
||||
close(fd);
|
||||
(void) close(fd);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -3304,7 +3304,8 @@ static int include_description_file(char *name, char *des_file)
|
||||
out_free:
|
||||
dm_free(buf);
|
||||
out_close:
|
||||
close(fd);
|
||||
if (close(fd))
|
||||
log_sys_debug("close", des_file);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user