Author: cem
Date: Tue Mar  3 23:15:30 2020
New Revision: 358596
URL: https://svnweb.freebsd.org/changeset/base/358596

Log:
  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.

Modified:
  head/sys/sys/signalvar.h

Modified: head/sys/sys/signalvar.h
==============================================================================
--- head/sys/sys/signalvar.h    Tue Mar  3 22:23:56 2020        (r358595)
+++ head/sys/sys/signalvar.h    Tue Mar  3 23:15:30 2020        (r358596)
@@ -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)                      \
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to