HomeFreeBSD

Linux: Fix octal detection in define_ddi_strtox()

Description

Linux: Fix octal detection in define_ddi_strtox()

Clang Tidy reported this as a misc-redundant-expression because writing
8 instead of '8' meant that the condition could never be true.

The only place where we have a chance of this being a bug would be in
nvlist_lookup_nvpair_ei_sep(). I am not sure if we ever pass an octal to
that, but if we ever do, it should work properly now instead of failing.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14575

Details

Provenance
Richard Yao <richard.yao@alumni.stonybrook.edu>Authored on Mar 5 2023, 7:01 AM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 8 2023, 9:52 PM
Parents
rG66a38fd10ac5: Linux: Suppress clang static analyzer warning in zfs_remove()
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG703283fabd14: Linux: Fix octal detection in define_ddi_strtox() (authored by Richard Yao <richard.yao@alumni.stonybrook.edu>).Mar 8 2023, 9:52 PM