aboutsummaryrefslogtreecommitdiff
path: root/pcap-linux.c
diff options
context:
space:
mode:
authorDenis Ovsienko <denis@ovsienko.info>2018-07-12 20:09:07 +0000
committerDenis Ovsienko <denis@ovsienko.info>2018-07-12 20:10:04 +0000
commit89f9d9d5b7d24ef244317acc24ddc0aa3665cbb6 (patch)
tree7c9dd33cd850c6ccf722ede30a6f4ff04666dd9e /pcap-linux.c
parentda80c1a6b5fbc694930a2ae74e4260197db4dc68 (diff)
Address the compiler warnings after commit 8cff296.
./pcap-linux.c: In function ‘pcap_read_packet’: ./pcap-linux.c:1911:7: warning: suggest parentheses around assignment used as truth value [-Wparentheses] if (handle->linktype = DLT_LINUX_SLL2) { ^~~~~~ ./pcap-linux.c: In function ‘fix_offset’: ./pcap-linux.c:7169:14: warning: unused variable ‘hdr_len’ [-Wunused-variable] bpf_u_int32 hdr_len; ^~~~~~~ [skip ci]
Diffstat (limited to 'pcap-linux.c')
-rw-r--r--pcap-linux.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index 6e34279a..a345a1aa 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -1908,7 +1908,7 @@ pcap_read_packet(pcap_t *handle, pcap_handler callback, u_char *userdata)
* Add the length of the fake header to the length
* of packet data we read.
*/
- if (handle->linktype = DLT_LINUX_SLL2) {
+ if (handle->linktype == DLT_LINUX_SLL2) {
struct sll2_header *hdrp;
packet_len += SLL2_HDR_LEN;
@@ -7166,8 +7166,6 @@ fix_program(pcap_t *handle, struct sock_fprog *fcode, int is_mmapped)
static int
fix_offset(pcap_t *handle, struct bpf_insn *p)
{
- bpf_u_int32 hdr_len;
-
if (handle->linktype == DLT_LINUX_SLL2) {
/*
* What's the offset?