]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-usb.c
Don't print timestamps to a buffer and then print the buffer.
[tcpdump] / print-usb.c
index 7b750a06c85919379c070dd599f3b21346d6521d..56e6dd4674b9d4ac186b0f6552ad3c95050830cf 100644 (file)
@@ -135,7 +135,6 @@ typedef struct _usb_isodesc {
        nd_byte         pad[4];
 } usb_isodesc;
 
-static const char tstr[] = "[|usb]";
 
 /* returns direction: 1=inbound 2=outbound -1=invalid */
 static int
@@ -245,7 +244,7 @@ usb_linux_48_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
 {
        ndo->ndo_protocol = "usb_linux_48_byte_if";
        if (h->caplen < sizeof(pcap_usb_header)) {
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                return(sizeof(pcap_usb_header));
        }
 
@@ -269,7 +268,7 @@ usb_linux_64_byte_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
 {
        ndo->ndo_protocol = "usb_linux_64_byte_if";
        if (h->caplen < sizeof(pcap_usb_header_mmapped)) {
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                return(sizeof(pcap_usb_header_mmapped));
        }