X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/546558eabd81cfc36a81a4df728fdfea0d83b41a..e2f14ebc87586ecad6901c09a1cb7e371baf2ea1:/print-null.c diff --git a/print-null.c b/print-null.c index f1f66930..f730a23f 100644 --- a/print-null.c +++ b/print-null.c @@ -33,7 +33,6 @@ #include "extract.h" #include "af.h" -static const char tstr[] = " [|null]"; /* * The DLT_NULL packet header is 4 bytes long. It contains a host-byte-order @@ -87,7 +86,7 @@ null_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char goto trunc; ND_TCHECK_4(p); - memcpy((char *)&family, (const char *)p, sizeof(family)); + family = GET_HE_U_4(p); /* * This isn't necessarily in our host byte order; if this is @@ -141,13 +140,6 @@ null_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char return (NULL_HDRLEN); trunc: - ND_PRINT("%s", tstr); + nd_print_trunc(ndo); return (NULL_HDRLEN); } - -/* - * Local Variables: - * c-style: whitesmith - * c-basic-offset: 8 - * End: - */