diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-04-28 14:22:37 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-28 14:22:37 +0000 |
commit | 59ede8562743505e019da6c7399f4412ef44bc35 (patch) | |
tree | 58caca8a4c5ffa77f30a922fd5a5f1b3111e87b6 | |
parent | 3ae5776422bcd5a17914e9a63c84736a2789f9a2 (diff) | |
download | glibc-59ede8562743505e019da6c7399f4412ef44bc35.tar.gz |
(ether_aton_r): Preserve high-nibble value in hex conversion.
-rw-r--r-- | inet/ether_aton_r.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inet/ether_aton_r.c b/inet/ether_aton_r.c index 4b38f034cc..e82cb21817 100644 --- a/inet/ether_aton_r.c +++ b/inet/ether_aton_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. @@ -45,7 +45,7 @@ ether_aton_r (const char *asc, struct ether_addr *addr) if ((ch < '0' || ch > '9') && (ch < 'a' || ch > 'f')) return NULL; number <<= 4; - number = isdigit (ch) ? (ch - '0') : (ch - 'a' + 10); + number += isdigit (ch) ? (ch - '0') : (ch - 'a' + 10); ch = *asc; if (cnt < 5 && ch != ':') |