aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2023-03-05 02:01:58 -0500
committerBrian Behlendorf <[email protected]>2023-03-08 13:52:09 -0800
commit703283fabd147e2147a93fc9d83d9ca57b3c0fdd (patch)
tree44537cfe90fd10a10d80ad064ca055f4f6347691 /module
parent66a38fd10ac5dd8734c9a024e8cb5745436e6f62 (diff)
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 <[email protected]> Signed-off-by: Richard Yao <[email protected]> Closes #14575
Diffstat (limited to 'module')
-rw-r--r--module/os/linux/spl/spl-generic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/os/linux/spl/spl-generic.c b/module/os/linux/spl/spl-generic.c
index 38515023e..986db1518 100644
--- a/module/os/linux/spl/spl-generic.c
+++ b/module/os/linux/spl/spl-generic.c
@@ -496,7 +496,7 @@ int ddi_strto##type(const char *str, char **endptr, \
if (tolower(str[1]) == 'x' && isxdigit(str[2])) { \
base = 16; /* hex */ \
ptr += 2; \
- } else if (str[1] >= '0' && str[1] < 8) { \
+ } else if (str[1] >= '0' && str[1] < '8') { \
base = 8; /* octal */ \
ptr += 1; \
} else { \