Correct printf format for received/dropped packet counts in cleanup().

ps_recv and ps_drop (struct pcap_stat) are both type u_int.
Index: tcpdump.c
===================================================================
RCS file: /cvs/src/usr.sbin/tcpdump/tcpdump.c,v
retrieving revision 1.75
diff -u -p -r1.75 tcpdump.c
--- tcpdump.c   14 Oct 2015 04:55:17 -0000      1.75
+++ tcpdump.c   28 Oct 2015 02:43:30 -0000
@@ -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));
                }
        }

Reply via email to