From 1a3bb3fd5c87572da19a6a54063e4d23cca2ac03 Mon Sep 17 00:00:00 2001 From: Christopher Friedt Date: Sun, 18 Feb 2024 10:29:05 -0500 Subject: [PATCH] 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 --- lib/posix/options/mqueue.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/posix/options/mqueue.c b/lib/posix/options/mqueue.c index 042b40910a8..ca8e5474488 100644 --- a/lib/posix/options/mqueue.c +++ b/lib/posix/options/mqueue.c @@ -411,7 +411,6 @@ static void *mq_notify_thread(void *arg) remove_notification(mqueue); - pthread_exit(NULL); return NULL; }