We prefer if (count > 0) to if (count) (non-boolean variables) but this is not mentioned in style.9. Make it explicit.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Maybe should downgrade the statement to something like "if (count > 0) is preferred over if (count)"
share/man/man9/style.9 | ||
---|---|---|
762 | s/Use/Prefer |