aboutsummaryrefslogtreecommitdiff
path: root/pcap-snf.c
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2023-01-02 15:11:12 +0000
committerDenis Ovsienko <denis@ovsienko.info>2023-01-02 15:11:12 +0000
commit3ba53bfd192764f5a6b681ccd2aa70b42f968650 (patch)
tree830a85ee243fe37da7bdcb8faf87d479f79d5889 /pcap-snf.c
parent5d055cc10560d8df19109be844ef45ee79a8086d (diff)
Remove an always-false pointer test from snf_read().
Guy Harris: "The only way snf_read() gets called is through the read_op function pointer in the pcap_t, so the only way it gets called is if you have a non-NULL pcap_t * pointing to a pcap_t with a read_op set to snf_read()."
Diffstat (limited to 'pcap-snf.c')
-rw-r--r--pcap-snf.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/pcap-snf.c b/pcap-snf.c
index b885e026..95a64ac0 100644
--- a/pcap-snf.c
+++ b/pcap-snf.c
@@ -137,9 +137,6 @@ snf_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
struct snf_recv_req req;
int nonblock, timeout;
- if (!p)
- return -1;
-
/*
* This can conceivably process more than INT_MAX packets,
* which would overflow the packet count, causing it either