posix: mqmeue: do not return NULL after pthread_exit()

pthread_exit() does not return and therefore it does not make
sense to return NULL after it in mq_notify_thread(), and that
would constitute dead code.

Rather than explicitly exiting the thread, simply return
gracefully from the thread function, and allow the pthread to
terminate in the usual way.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
This commit is contained in:
Christopher Friedt 2024-02-18 10:29:05 -05:00 committed by Chris Friedt
parent 9d1df132b1
commit 1a3bb3fd5c

View file

@ -411,7 +411,6 @@ static void *mq_notify_thread(void *arg)
remove_notification(mqueue);
pthread_exit(NULL);
return NULL;
}