]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Linux: Fix octal detection in define_ddi_strtox()
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Sun, 5 Mar 2023 07:01:58 +0000 (02:01 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 8 Mar 2023 21:52:09 +0000 (13:52 -0800)
commit703283fabd147e2147a93fc9d83d9ca57b3c0fdd
tree44537cfe90fd10a10d80ad064ca055f4f6347691
parent66a38fd10ac5dd8734c9a024e8cb5745436e6f62
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
module/os/linux/spl/spl-generic.c