We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15a9056 commit f148a90Copy full SHA for f148a90
src/video_capture/testcard2.c
@@ -423,10 +423,7 @@ static void vidcap_testcard2_done(void *state)
423
pthread_mutex_unlock(&s->lock);
424
pthread_cond_signal(&s->data_consumed_cv);
425
426
- pthread_t null_thread_id;
427
- memset(&null_thread_id, 0, sizeof null_thread_id); // for safe memcmp
428
- null_thread_id = PTHREAD_NULL;
429
- if (memcmp(&s->thread_id, &null_thread_id, sizeof s->thread_id) != 0) {
+ if (!pthread_equal(s->thread_id, PTHREAD_NULL)) {
430
pthread_join(s->thread_id, NULL);
431
}
432
0 commit comments