--------
In message <1528232004.63685.25.ca...@freebsd.org>, Ian Lepore writes:
>On Tue, 2018-06-05 at 20:34 +0000, Eric van Gyzen wrote:

>>   (((flags) & M_WAITOK) || _malloc_item != NULL)
>
>This is a sad sad thing. Treating (bits & flagconstants) as boolean has
>a long long history in C. Surely there are literally thousand of
>occurrances in freebsd code already, so why did this one get flagged?

FlexeLint also gets its knickers in a twist about this kind of construct
and as far as I can tell the origin of that particular interpretation
comes out of the MISRA C rules.

In FlexeLint that specific check can be disabled, and I would imagine
Coverity has a similar tweakable setting.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
p...@freebsd.org         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to