Tests: Unchecked pthread_create return value
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 1 Aug 2016 19:07:42 +0000 (15:07 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 1 Aug 2016 19:07:42 +0000 (15:07 -0400)
Reported-by Coverity Scan:
CID 1360529 (#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 2a69d5e452d8d42b36cfa2e0d24be96b5e420d48..e0e92fd381c8980499059aea44c77525b2922fd2 100644 (file)
@@ -751,7 +751,12 @@ void epoll_pwait_concurrent_munmap(void)
                }
        }
        stop_thread = 0;
-       pthread_create(&writer, NULL, &epoll_pwait_writer, (void *) epoll_event);
+       ret = pthread_create(&writer, NULL, &epoll_pwait_writer,
+                       (void *) epoll_event);
+       if (ret != 0) {
+               fprintf(stderr, "[error] pthread_create\n");
+               goto end;
+       }
 
        ret = epoll_pwait(epollfd, epoll_event, 1, 1, NULL);
 
This page took 0.029602 seconds and 4 git commands to generate.