Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/usr.sbin/arp Pull up revision 1.26 (requested by he):



details:   https://anonhg.NetBSD.org/src/rev/b0188cd65d6d
branches:  netbsd-1-4
changeset: 471119:b0188cd65d6d
user:      he <he%NetBSD.org@localhost>
date:      Thu Oct 19 17:04:49 2000 +0000

description:
Pull up revision 1.26 (requested by he):
  Format string cleanup.

diffstat:

 usr.sbin/arp/arp.c |  12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r 281fd575cf7d -r b0188cd65d6d usr.sbin/arp/arp.c
--- a/usr.sbin/arp/arp.c        Thu Oct 19 17:04:48 2000 +0000
+++ b/usr.sbin/arp/arp.c        Thu Oct 19 17:04:49 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arp.c,v 1.23 1998/02/10 03:45:06 mrg Exp $ */
+/*     $NetBSD: arp.c,v 1.23.2.1 2000/10/19 17:04:49 he Exp $ */
 
 /*
  * Copyright (c) 1984, 1993
@@ -46,7 +46,7 @@
 #if 0
 static char sccsid[] = "@(#)arp.c      8.3 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: arp.c,v 1.23 1998/02/10 03:45:06 mrg Exp $");
+__RCSID("$NetBSD: arp.c,v 1.23.2.1 2000/10/19 17:04:49 he Exp $");
 #endif
 #endif /* not lint */
 
@@ -460,18 +460,14 @@
 {
        int i;
        u_int8_t *p;
-       const char *hexfmt = "%x";
-
-       if (sdl->sdl_type == IFT_ETHER || sdl->sdl_type == IFT_FDDI)
-               hexfmt = "%02x";
 
        i = sdl->sdl_alen;
        p = LLADDR(sdl);
 
-       (void)printf(hexfmt, *p);
+       (void)printf("%02x", *p);
        while (--i > 0) {
                putchar(':');
-               (void)printf(hexfmt, *++p);
+               (void)printf("%02x", *++p);
        }
 }
 



Home | Main Index | Thread Index | Old Index