X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/0e6bd5e431f1d67fceb02cbd810e7e9a62bf73a0..0c0222b2c0e4b310a56bdde8e23e55890e7c95b0:/print-bootp.c diff --git a/print-bootp.c b/print-bootp.c index 641b8feb..2c823f4e 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -22,7 +22,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.56 2000-12-04 00:00:08 fenner Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-bootp.c,v 1.58 2001-04-27 02:17:10 fenner Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -498,8 +498,11 @@ rfc1048_print(register const u_char *bp, register u_int length) /* Bytes */ while (size > 0) { if (!first) - putchar (c == 'x' ? ':' : '.'); - printf (c == 'x' ? "%02x" : "%d", *bp); + putchar(c == 'x' ? ':' : '.'); + if (c == 'x') + printf("%02x", *bp); + else + printf("%d", *bp); ++bp; --size; first = 0; @@ -519,11 +522,10 @@ static void cmu_print(register const u_char *bp, register u_int length) { register const struct cmu_vend *cmu; - char *fmt = " %s:%s"; #define PRINTCMUADDR(m, s) { TCHECK(cmu->m); \ if (cmu->m.s_addr != 0) \ - printf(fmt, s, ipaddr_string(&cmu->m.s_addr)); } + printf(" %s:%s", s, ipaddr_string(&cmu->m.s_addr)); } printf(" vend-cmu"); cmu = (struct cmu_vend *)bp;