Date: Tue, 3 Mar 2020 23:15:30 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358596 - head/sys/sys Message-ID: <202003032315.023NFUIP033016@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003032315.023NFUIP033016>