Tests: unchecked pthread_join return value
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 1 Aug 2016 19:32:39 +0000 (15:32 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 1 Aug 2016 19:32:39 +0000 (15:32 -0400)
Reported-by Coverity Scan:
CID 1360530 (#1 of 1): Unchecked return value (CHECKED_RETURN)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/regression/kernel/select_poll_epoll.c

index e0e92fd381c8980499059aea44c77525b2922fd2..cb39b08191b41701a9bb299cd2c414203499dcc3 100644 (file)
@@ -655,7 +655,11 @@ void stress_ppoll(int *fds, int value)
                do_ppoll(fds, ufds);
        }
        stop_thread = 1;
-       pthread_join(writer, NULL);
+       ret = pthread_join(writer, NULL);
+       if (ret) {
+               fprintf(stderr, "[error] pthread_join\n");
+               goto end;
+       }
 end:
        return;
 }
@@ -773,8 +777,11 @@ void epoll_pwait_concurrent_munmap(void)
        }
 
        stop_thread = 1;
-       pthread_join(writer, NULL);
-
+       ret = pthread_join(writer, NULL);
+       if (ret) {
+               fprintf(stderr, "[error] pthread_join\n");
+               goto end_unmap;
+       }
 end_unmap:
        for (i = 0; i < MAX_FDS; i++) {
                ret = close(fds[i]);
This page took 0.028102 seconds and 4 git commands to generate.