]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 28 Apr 1998 14:22:07 +0000 (14:22 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 28 Apr 1998 14:22:07 +0000 (14:22 +0000)
* 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.

ChangeLog
inet/ether_aton.c
inet/ether_aton_r.c

index 1f0f4d3a7cf71e1d0600639a85182e480b946972..866fa203b622ba9c9fe96fe8834e7cb0243a3fca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 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>.
index 20300c806af728efd5fdec239253131f1d638c45..574800765a84c58c55bb111670cde27b4492b215 100644 (file)
@@ -1,4 +1,4 @@
-/* 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.
 
@@ -24,7 +24,7 @@
 struct ether_addr *
 ether_aton (const char *asc)
 {
-  struct ether_addr result;
+  static struct ether_addr result;
 
   return ether_aton_r (asc, &result);
 }
index 28fe6f6962ff640cdc81d57ac4d93aa1b19a1967..14ccd2574fa8c8120919813760b798c736fb91f7 100644 (file)
@@ -1,4 +1,4 @@
-/* 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.
 
@@ -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 != ':')