HomeFreeBSD

Cleanup: Remove ineffective unsigned comparisons against 0

Description

Cleanup: Remove ineffective unsigned comparisons against 0

Coverity found a number of places where we either do MAX(unsigned, 0) or
do assertions that a unsigned variable is >= 0. These do nothing, so
let us drop them all.

It also found a spot where we do if (unsigned >= 0 && ...). Let us
also drop the unsigned >= 0 check.

Reviewed-by: Neal Gompa <ngompa@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #13871

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Sep 27 2022, 12:02 AM
GitHub <noreply@github.com>Committed on Sep 27 2022, 12:02 AM
Parents
rG52afc3443d16: Linux: Fix uninitialized variable usage in zio_do_crypt_data()
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG8ef15f9322dd: Cleanup: Remove ineffective unsigned comparisons against 0 (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Sep 27 2022, 12:02 AM