Fix Coverity unchecked return value defect. CID: 1415101 Signed-off-by: Vinson Lee <v...@freedesktop.org> --- tests/glx/glx-multithread-clearbuffer.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/tests/glx/glx-multithread-clearbuffer.c b/tests/glx/glx-multithread-clearbuffer.c index 577fde842435..da301089f2a6 100644 --- a/tests/glx/glx-multithread-clearbuffer.c +++ b/tests/glx/glx-multithread-clearbuffer.c @@ -82,6 +82,7 @@ main(int argc, char **argv) { /* Need at least 16 contexts to congest the thread queue. */ pthread_t thread[16]; + bool pass = true; XInitThreads(); @@ -90,11 +91,15 @@ main(int argc, char **argv) for (int i = 0; i < ARRAY_SIZE(thread); i++) pthread_create(&thread[i], NULL, thread_func, NULL); - for (int i = 0; i < ARRAY_SIZE(thread); i++) - pthread_join(thread[i], NULL); + for (int i = 0; i < ARRAY_SIZE(thread); i++) { + int err = pthread_join(thread[i], NULL); + + if (err) + pass = false; + } pthread_mutex_destroy(&mutex); - piglit_report_result(PIGLIT_PASS); + piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL); return 0; } -- 2.11.0 _______________________________________________ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit