diff options
Diffstat (limited to 'resolv/inet_net_pton.c')
-rw-r--r-- | resolv/inet_net_pton.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/resolv/inet_net_pton.c b/resolv/inet_net_pton.c index d3f1350312..2f06c6803f 100644 --- a/resolv/inet_net_pton.c +++ b/resolv/inet_net_pton.c @@ -91,9 +91,7 @@ inet_net_pton_ipv4(src, dst, size) u_char *dst; size_t size; { - static const char - xdigits[] = "0123456789abcdef", - digits[] = "0123456789"; + static const char xdigits[] = "0123456789abcdef"; int n, ch, tmp, dirty, bits; const u_char *odst = dst; @@ -125,7 +123,7 @@ inet_net_pton_ipv4(src, dst, size) for (;;) { tmp = 0; do { - n = strchr(digits, ch) - digits; + n = strchr(xdigits, ch) - xdigits; assert(n >= 0 && n <= 9); tmp *= 10; tmp += n; @@ -153,7 +151,7 @@ inet_net_pton_ipv4(src, dst, size) ch = *src++; /* Skip over the /. */ bits = 0; do { - n = strchr(digits, ch) - digits; + n = strchr(xdigits, ch) - xdigits; assert(n >= 0 && n <= 9); bits *= 10; bits += n; |