]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-usb.c
More UNALIGNED_MEM{CPY,CMP} on IP addresses.
[tcpdump] / print-usb.c
index 8e15e7bf39d1eb93c0e7960aed9ad4a699866f96..425e35d4997ca0f3724e40eea92c1c6598ff12bf 100644 (file)
@@ -35,6 +35,8 @@
 #if defined(HAVE_PCAP_USB_H) && defined(DLT_USB_LINUX)
 #include <pcap/usb.h>
 
+static const char tstr[] = "[|usb]";
+
 /* returns direction: 1=inbound 2=outbound -1=invalid */
 static int
 get_direction(int transfer_type, int event_type)
@@ -138,7 +140,7 @@ u_int
 usb_linux_48_byte_print(const struct pcap_pkthdr *h, register const u_char *p)
 {
        if (h->caplen < sizeof(pcap_usb_header)) {
-               printf("[|usb]");
+               printf("%s", tstr);
                return(sizeof(pcap_usb_header));
        }
 
@@ -160,7 +162,7 @@ u_int
 usb_linux_64_byte_print(const struct pcap_pkthdr *h, register const u_char *p)
 {
        if (h->caplen < sizeof(pcap_usb_header_mmapped)) {
-               printf("[|usb]");
+               printf("%s", tstr);
                return(sizeof(pcap_usb_header_mmapped));
        }