diff options
author | Guy Harris <guy@alum.mit.edu> | 2019-09-03 11:34:15 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2019-09-03 11:34:15 -0700 |
commit | 79a3be33a869eb58334868b82182a55672c981fd (patch) | |
tree | ea7d12e01626ae56d414ee18b98cda581fbfa0de /strtoaddr.c | |
parent | 94d1a180c77f9bb47c19eb68f62fd6026cfedc5d (diff) | |
download | tcpdump-79a3be33a869eb58334868b82182a55672c981fd.tar.gz |
Get rid of useless test.
The test was always useless, but, as Coverity apparently didn't realize
that isdigit() returns true only for '0'-'9', it didn't notice until we
used ND_ASCII_ISDIGIT() instead.
Addresses Coverity CID 1453475.
Diffstat (limited to 'strtoaddr.c')
-rw-r--r-- | strtoaddr.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/strtoaddr.c b/strtoaddr.c index b3b84972..c6f79d9a 100644 --- a/strtoaddr.c +++ b/strtoaddr.c @@ -84,8 +84,6 @@ strtoaddr(const char *src, void *dst) for (;;) { if (ND_ASCII_ISDIGIT(c)) { digit = c - '0'; - if (digit >= 10) - break; val = (val * 10) + digit; c = *++src; } else |