From 43efaf01632c0be8629a5b86f2eadf1c0de98ceb Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 7 Mar 2017 21:51:22 +0100 Subject: [PATCH] monitor: Cast bytes_read to incl_len type from PCAP packet --- monitor/pcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/pcap.c b/monitor/pcap.c index caf35ef7..aae0956b 100644 --- a/monitor/pcap.c +++ b/monitor/pcap.c @@ -215,7 +215,7 @@ bool pcap_read(struct pcap *pcap, struct timeval *tv, return false; } - if (bytes_read < pkt.incl_len) { + if ((uint32_t) bytes_read < pkt.incl_len) { if (lseek(pcap->fd, pkt.incl_len - bytes_read, SEEK_CUR) < 0) { pcap->closed = true; return false;