./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]
* Add the length of the fake header to the length
* of packet data we read.
*/
* 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;
struct sll2_header *hdrp;
packet_len += SLL2_HDR_LEN;
static int
fix_offset(pcap_t *handle, struct bpf_insn *p)
{
static int
fix_offset(pcap_t *handle, struct bpf_insn *p)
{
if (handle->linktype == DLT_LINUX_SLL2) {
/*
* What's the offset?
if (handle->linktype == DLT_LINUX_SLL2) {
/*
* What's the offset?