Skip to content

Commit

Permalink
posix: mqmeue: do not return NULL after pthread_exit()
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cfriedt committed Feb 26, 2024
1 parent 9d1df13 commit 1a3bb3f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/posix/options/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,6 @@ static void *mq_notify_thread(void *arg)

remove_notification(mqueue);

pthread_exit(NULL);
return NULL;
}

Expand Down

0 comments on commit 1a3bb3f

Please sign in to comment.