Fix warning in qemu-nbd.c
qemu-nbd.c:349: error: ignoring return value of 'daemon', declared with attribute warn_unused_result Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
eeb7c03c0f
commit
f5de141b34
@ -345,8 +345,12 @@ int main(int argc, char **argv)
|
||||
pid_t pid;
|
||||
int sock;
|
||||
|
||||
if (!verbose)
|
||||
daemon(0, 0); /* detach client and server */
|
||||
if (!verbose) {
|
||||
/* detach client and server */
|
||||
if (daemon(0, 0) == -1) {
|
||||
errx(errno, "Failed to daemonize");
|
||||
}
|
||||
}
|
||||
|
||||
if (socket == NULL) {
|
||||
sprintf(sockpath, SOCKET_PATH, basename(device));
|
||||
|
Loading…
Reference in New Issue
Block a user