HomeFreeBSD

Make Coverity more happy with r334545

Description

Make Coverity more happy with r334545

Coverity complains about:

if (((flags) & M_WAITOK) || _malloc_item != NULL)

saying:

The expression

		1 /* (2 | 0x100) & 2 */ || _malloc_item != NULL

is suspicious because it performs a Boolean operation
on a constant other than 0 or 1.

Although the code is correct, add "!= 0" to make it slightly
more legible and to silence hundreds(?) of Coverity warnings.

Reported by: Coverity
Discussed with: mjg
Sponsored by: Dell EMC

Details

Provenance
vangyzenAuthored on Jun 5 2018, 8:34 PM
Parents
rGc41bbc0acbd7: audit(4): add tests for open(2) and openat(2)
Branches
Unknown
Tags
Unknown

Event Timeline