diff options
-rw-r--r-- | dissector_sll.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/dissector_sll.c b/dissector_sll.c index a69a6a4..ac8f017 100644 --- a/dissector_sll.c +++ b/dissector_sll.c @@ -35,13 +35,9 @@ static char *pkt_type2str(uint8_t pkttype) static void sll_print_full(struct pkt_buff *pkt) { - struct sockaddr_ll *sll; + struct sockaddr_ll *sll = pkt->sll; char addr_str[40] = {}; - if (!pkt || !pkt->sll) - return; - - sll = pkt->sll; tprintf(" [ Linux \"cooked\""); tprintf(" Pkt Type %d (%s)", sll->sll_pkttype, pkt_type2str(sll->sll_pkttype)); @@ -69,13 +65,9 @@ static void sll_print_full(struct pkt_buff *pkt) static void sll_print_less(struct pkt_buff *pkt) { - struct sockaddr_ll *sll; + struct sockaddr_ll *sll = pkt->sll; char addr_str[40] = {}; - if (!pkt || !pkt->sll) - return; - - sll = pkt->sll; tprintf(" Pkt Type %d (%s)", sll->sll_pkttype, pkt_type2str(sll->sll_pkttype)); tprintf(", If Type %d (%s)", sll->sll_hatype, |