1998-04-28 Ulrich Drepper <drepper@cygnus.com>
+ * inet/ether_aton_r.c (ether_aton_r): Preserve high-nibble value
+ in hex conversion.
+ * inet/ether_aton.c (ether_aton): Declare result variable static.
+ Reported by ahyung@unixg.ubc.ca.
+
* sysdeps/unix/sysv/linux/bits/sem.h: Don't define union semun.
Define macro _SEM_SEMUN_UNDEFINED instead.
Reported by Dirk Laessig <d.laessig@tu-bs.de>.
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
struct ether_addr *
ether_aton (const char *asc)
{
- struct ether_addr result;
+ static struct ether_addr result;
return ether_aton_r (asc, &result);
}
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
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 != ':')