lib: Fix 1417431 Unchecked return value from library
authorVolker Lendecke <vl@samba.org>
Tue, 5 Sep 2017 11:17:54 +0000 (13:17 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 5 Sep 2017 17:13:12 +0000 (19:13 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/pthreadpool/tests.c

index 999118286eba7cbb45cfda5db8bc4aeae1f75b5e..1aab80c2bb4284211b1cbd167b5e1d63896a4e0c 100644 (file)
@@ -232,7 +232,11 @@ static int test_busyfork(void)
                return -1;
        }
 
-       poll(NULL, 0, 200);
+       ret = poll(NULL, 0, 200);
+       if (ret == -1) {
+               perror("poll failed");
+               return -1;
+       }
 
        child = fork();
        if (child < 0) {
@@ -278,7 +282,11 @@ static int test_busyfork(void)
                return -1;
        }
 
-       poll(NULL, 0, 200);
+       ret = poll(NULL, 0, 200);
+       if (ret == -1) {
+               perror("poll failed");
+               return -1;
+       }
 
        waitret = waitpid(child, &wstatus, WNOHANG);
        if (waitret != child) {