HomeFreeBSD

style.9: be explicit about booleans in comparisons

Description

style.9: be explicit about booleans in comparisons

We prefer something like "if (count != 0)" over "if (count)" for
non-boolean variables. This was implicit in examples, but was unclear
for some new contributors. Attempt to clarify by providing a more
explicit statement and example.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30507

Details

Provenance
emasteAuthored on May 27 2021, 3:25 PM
Reviewer
imp
Differential Revision
D30507: style.9: be explicit about booleans in comparisons
Parents
rG65b20771713c: pf tests: Simplify handling of pfctl -s
Branches
Unknown
Tags
Unknown