diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2021-07-31 11:10:57 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-07-31 11:17:18 -0700 |
| commit | 84da62974d0325481044f49a03984c5e47eaf927 (patch) | |
| tree | aac548af1f734af9fa8cd6627d702ea8e685181f | |
| parent | doc: add options summary list to tr texinfo (diff) | |
| download | coreutils-84da62974d0325481044f49a03984c5e47eaf927.tar.gz coreutils-84da62974d0325481044f49a03984c5e47eaf927.zip | |
numfmt: omit unnecessary pointer test
Caught by GCC 11.1 -fanalyzer.
* src/numfmt.c (simple_strtod_int): Remove unnecessary test of
*endptr vs NULL. Presumably this was a typo and **endptr was
intended instead of *endptr, but an **endptr test is also
unnecessary since c_isdigit (0) returns false.
| -rw-r--r-- | src/numfmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/numfmt.c b/src/numfmt.c index fda03b4dd..35209591a 100644 --- a/src/numfmt.c +++ b/src/numfmt.c @@ -480,7 +480,7 @@ simple_strtod_int (char const *input_str, *negative = false; *endptr = (char *) input_str; - while (*endptr && c_isdigit (**endptr)) + while (c_isdigit (**endptr)) { int digit = (**endptr) - '0'; |
