summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/tcpdump.c
diff options
context:
space:
mode:
authorjca <jca@openbsd.org>2015-10-28 12:28:14 +0000
committerjca <jca@openbsd.org>2015-10-28 12:28:14 +0000
commit5a7b4dd4278c992fee8751452fc3864df7a4937c (patch)
treeb4c11fec74e0c80a10c5cdd7a5e0a4442e877506 /usr.sbin/tcpdump/tcpdump.c
parentBy hoisting sysctl hw.cpuspeed towards the top, it is possible to (diff)
downloadwireguard-openbsd-5a7b4dd4278c992fee8751452fc3864df7a4937c.tar.xz
wireguard-openbsd-5a7b4dd4278c992fee8751452fc3864df7a4937c.zip
pcap_stat fields are unsigned, print them as such
Patch from Kevin Reay.
Diffstat (limited to 'usr.sbin/tcpdump/tcpdump.c')
-rw-r--r--usr.sbin/tcpdump/tcpdump.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/tcpdump.c b/usr.sbin/tcpdump/tcpdump.c
index a0ed77cc7d6..480ba7ecb51 100644
--- a/usr.sbin/tcpdump/tcpdump.c
+++ b/usr.sbin/tcpdump/tcpdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcpdump.c,v 1.75 2015/10/14 04:55:17 guenther Exp $ */
+/* $OpenBSD: tcpdump.c,v 1.76 2015/10/28 12:28:14 jca Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -522,10 +522,10 @@ cleanup(int signo)
write(STDERR_FILENO, buf, strlen(buf));
} else {
(void)snprintf(buf, sizeof buf,
- "%d packets received by filter\n", stat.ps_recv);
+ "%u packets received by filter\n", stat.ps_recv);
write(STDERR_FILENO, buf, strlen(buf));
(void)snprintf(buf, sizeof buf,
- "%d packets dropped by kernel\n", stat.ps_drop);
+ "%u packets dropped by kernel\n", stat.ps_drop);
write(STDERR_FILENO, buf, strlen(buf));
}
}