From 2bde6d4e7289dbf12b3747b24aea39b6e37e0855 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Tue, 3 Mar 2020 23:15:30 +0000 Subject: [PATCH] sys/signalvar.h: Fix opposite boolean sense in comment Correct the sense of the comment describing sigsetmasked() to match the code. It was exactly backwards. While here, convert the type/values of the predicate from pre-C99 int/1/0 to bool/true/false. No functional change. --- sys/sys/signalvar.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h index dc1a46003e2..7edc9f3327c 100644 --- a/sys/sys/signalvar.h +++ b/sys/sys/signalvar.h @@ -282,20 +282,20 @@ extern bool sigfastblock_fetch_always; (!SIGISEMPTY((td)->td_proc->p_siglist) && \ !sigsetmasked(&(td)->td_proc->p_siglist, &(td)->td_sigmask))) /* - * Return the value of the pseudo-expression ((*set & ~*mask) != 0). This + * Return the value of the pseudo-expression ((*set & ~*mask) == 0). This * is an optimized version of SIGISEMPTY() on a temporary variable * containing SIGSETNAND(*set, *mask). */ -static __inline int +static __inline bool sigsetmasked(sigset_t *set, sigset_t *mask) { int i; for (i = 0; i < _SIG_WORDS; i++) { if (set->__bits[i] & ~mask->__bits[i]) - return (0); + return (false); } - return (1); + return (true); } #define ksiginfo_init(ksi) \