diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2023-01-02 15:11:12 +0000 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2023-01-02 15:11:12 +0000 |
commit | 3ba53bfd192764f5a6b681ccd2aa70b42f968650 (patch) | |
tree | 830a85ee243fe37da7bdcb8faf87d479f79d5889 | |
parent | 5d055cc10560d8df19109be844ef45ee79a8086d (diff) | |
download | libpcap-3ba53bfd192764f5a6b681ccd2aa70b42f968650.tar.gz |
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()."
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | pcap-snf.c | 3 |
2 files changed, 1 insertions, 3 deletions
@@ -3,6 +3,7 @@ Monthday, Month DD, YYYY: Source code: Use C99 fixed-width integer types, rather than self-defined fixed-width integer types, in rpcap code. + Remove an always-false pointer test from snf_read(). Link-layer types: Add LINKTYPE_ETW/DLT_ETW. Add LINKTYPE_NETANALYZER_NG/DLT_NETANALYZER_NG (pull request @@ -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 |