summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-01-08 16:28:05 -0800
committerGuy Harris <guy@alum.mit.edu>2015-01-08 16:33:20 -0800
commit15b3ddc717fc031a6173cff061ed51c16e45560a (patch)
tree75bd071a616a399263e97641dca36d5a79332eb6
parentac88ae4af1f72a8e8e18e7dcf4d428f7f19dd1bd (diff)
downloadlibpcap-15b3ddc717fc031a6173cff061ed51c16e45560a.tar.gz
tp_mac and tp_snaplen are unsigned; print them with %u, not %d.
See, for example, GitHub libpcap issue #404.
-rw-r--r--pcap-linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index 638b1c00..f8836aff 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -3682,7 +3682,7 @@ pcap_read_linux_mmap(pcap_t *handle, int max_packets, pcap_handler callback,
if (tp_mac + tp_snaplen > handle->bufsize) {
snprintf(handle->errbuf, PCAP_ERRBUF_SIZE,
"corrupted frame on kernel ring mac "
- "offset %d + caplen %d > frame len %d",
+ "offset %u + caplen %u > frame len %d",
tp_mac, tp_snaplen, handle->bufsize);
return -1;
}