aboutsummaryrefslogtreecommitdiff
path: root/sf-pcap-ng.c
diff options
context:
space:
mode:
Diffstat (limited to 'sf-pcap-ng.c')
-rw-r--r--sf-pcap-ng.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sf-pcap-ng.c b/sf-pcap-ng.c
index ea44da91..c9b282ac 100644
--- a/sf-pcap-ng.c
+++ b/sf-pcap-ng.c
@@ -1107,7 +1107,7 @@ pcap_ng_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data)
* and the packet length.
*/
hdr->caplen = hdr->len;
- if (hdr->caplen > p->snapshot)
+ if (hdr->caplen > (bpf_u_int32)p->snapshot)
hdr->caplen = p->snapshot;
t = 0; /* no time stamps */
goto found;
@@ -1173,7 +1173,7 @@ pcap_ng_next_packet(pcap_t *p, struct pcap_pkthdr *hdr, u_char **data)
idbp->linktype);
return (-1);
}
- if (p->snapshot != idbp->snaplen) {
+ if ((bpf_u_int32)p->snapshot != idbp->snaplen) {
pcap_snprintf(p->errbuf, PCAP_ERRBUF_SIZE,
"an interface has a snapshot length %u different from the type of the first interface",
idbp->snaplen);