From: Kevin Day Date: Thu, 4 Apr 2024 02:38:32 +0000 (-0500) Subject: Update: Use bitwise operation check in f_thread_cancel_state_set(). X-Git-Tag: 0.7.0~188 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=c84efaa61bdb87fd7e601e11047a000314480274;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 2369046..c9344ef 100644 --- a/level_0/f_thread/c/thread.c +++ b/level_0/f_thread/c/thread.c @@ -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);