aboutsummaryrefslogtreecommitdiff
path: root/src/l2_packet/l2_packet_pcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/l2_packet/l2_packet_pcap.c')
-rw-r--r--src/l2_packet/l2_packet_pcap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/l2_packet/l2_packet_pcap.c b/src/l2_packet/l2_packet_pcap.c
index c2b17fcf..423c099f 100644
--- a/src/l2_packet/l2_packet_pcap.c
+++ b/src/l2_packet/l2_packet_pcap.c
@@ -127,7 +127,7 @@ static void l2_packet_receive(int sock, void *eloop_ctx, void *sock_ctx)
packet = pcap_next(pcap, &hdr);
- if (!l2->rx_callback || !packet || hdr.caplen < sizeof(*ethhdr))
+ if (packet == NULL || hdr.caplen < sizeof(*ethhdr))
return;
ethhdr = (struct l2_ethhdr *) packet;
@@ -152,7 +152,7 @@ static void l2_packet_receive_cb(u_char *user, const struct pcap_pkthdr *hdr,
unsigned char *buf;
size_t len;
- if (!l2->rx_callback || !pkt_data || hdr->caplen < sizeof(*ethhdr))
+ if (pkt_data == NULL || hdr->caplen < sizeof(*ethhdr))
return;
ethhdr = (struct l2_ethhdr *) pkt_data;