]> Kevux Git Server - fll/commitdiff
Update: Use bitwise operation check in f_thread_cancel_state_set().
authorKevin Day <kevin@kevux.org>
Thu, 4 Apr 2024 02:38:32 +0000 (21:38 -0500)
committerKevin Day <kevin@kevux.org>
Thu, 4 Apr 2024 02:38:32 +0000 (21:38 -0500)
Also update the comment to make the context of "this" to be more clear.

level_0/f_thread/c/thread.c

index 23690461bcef00037ad165cac869193b0e0abb15..c9344ef02b0947ef3af5ac26a2bd887fc3247050 100644 (file)
@@ -614,8 +614,8 @@ extern "C" {
 
     int error = 0;
 
-    // POSIX doesn't allow this to be NULL, so make POSIX happy.
-    if (previous == 0) {
+    // POSIX doesn't allow "previous" to be NULL, so make POSIX happy.
+    if (!previous) {
       int ignore = 0;
 
       error = pthread_setcancelstate(state, &ignore);