From 5005d3b3302adfe379c6f4404f79f204d7c52cdb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 28 Apr 1998 14:22:07 +0000 Subject: Update. * 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. --- inet/ether_aton_r.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inet/ether_aton_r.c') diff --git a/inet/ether_aton_r.c b/inet/ether_aton_r.c index 28fe6f6962..14ccd2574f 100644 --- a/inet/ether_aton_r.c +++ b/inet/ether_aton_r.c @@ -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 , 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 != ':') -- cgit v1.2.3