From: Kevin Day Date: Thu, 4 Apr 2024 02:37:28 +0000 (-0500) Subject: Update: Use bitwise operation check in f_thread_cancel_state_set(). X-Git-Tag: 0.6.10~13 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=4d2f5402bd28b1f380fa206bd4b000454c4d794d;p=fll Update: Use bitwise operation check in f_thread_cancel_state_set(). Also update the comment to make the context of "this" to be more clear. --- diff --git a/level_0/f_thread/c/thread.c b/level_0/f_thread/c/thread.c index 204f28c..8b119c3 100644 --- a/level_0/f_thread/c/thread.c +++ b/level_0/f_thread/c/thread.c @@ -604,8 +604,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);