]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-bootp.c
Remove unneeded #includes
[tcpdump] / print-bootp.c
index 641b8febd675229538412af1fbe0922bbdf43313..2c823f4e181895344a18380c86778f03eb2a38e5 100644 (file)
@@ -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;