Tools: hv: check return value of daemon to fix compiler warning.
authorOlaf Hering <olaf@aepfle.de>
Thu, 1 Aug 2013 12:43:12 +0000 (14:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2013 03:44:52 +0000 (11:44 +0800)
hv_kvp_daemon.c: In function 'main':
hv_kvp_daemon.c:1441:8: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/hv/hv_kvp_daemon.c

index 657c1d2..418ac55 100644 (file)
@@ -1439,7 +1439,8 @@ int main(void)
        char *kvp_recv_buffer;
        size_t kvp_recv_buffer_len;
 
-       daemon(1, 0);
+       if (daemon(1, 0))
+               return 1;
        openlog("KVP", 0, LOG_USER);
        syslog(LOG_INFO, "KVP starting; pid is:%d", getpid());