Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/pf/sbin/pflogd Fix format string usage.
details: https://anonhg.NetBSD.org/src/rev/7e75737e1a7b
branches: trunk
changeset: 777686:7e75737e1a7b
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Feb 29 23:42:28 2012 +0000
description:
Fix format string usage.
diffstat:
dist/pf/sbin/pflogd/pflogd.c | 6 +++---
dist/pf/sbin/pflogd/pflogd.h | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r e8d56bed0b64 -r 7e75737e1a7b dist/pf/sbin/pflogd/pflogd.c
--- a/dist/pf/sbin/pflogd/pflogd.c Wed Feb 29 23:39:53 2012 +0000
+++ b/dist/pf/sbin/pflogd/pflogd.c Wed Feb 29 23:42:28 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pflogd.c,v 1.8 2010/12/13 01:45:38 christos Exp $ */
+/* $NetBSD: pflogd.c,v 1.9 2012/02/29 23:42:28 joerg Exp $ */
/* $OpenBSD: pflogd.c,v 1.45 2007/06/06 14:11:26 henning Exp $ */
/*
@@ -559,7 +559,7 @@
#endif
if (len < sizeof(*h) || h->caplen > (size_t)cur_snaplen) {
- logmsg(LOG_NOTICE, "invalid size %u (%u/%u), packet dropped",
+ logmsg(LOG_NOTICE, "invalid size %zu (%u/%u), packet dropped",
len, cur_snaplen, snaplen);
packets_dropped++;
return;
@@ -770,7 +770,7 @@
logmsg(LOG_WARNING, "Reading stats: %s", pcap_geterr(hpcap));
else
logmsg(LOG_NOTICE,
- "%u packets received, %u/%u dropped (kernel/pflogd)",
+ "%u packets received, %u/%ld dropped (kernel/pflogd)",
pstat.ps_recv, pstat.ps_drop, packets_dropped);
pcap_close(hpcap);
diff -r e8d56bed0b64 -r 7e75737e1a7b dist/pf/sbin/pflogd/pflogd.h
--- a/dist/pf/sbin/pflogd/pflogd.h Wed Feb 29 23:39:53 2012 +0000
+++ b/dist/pf/sbin/pflogd/pflogd.h Wed Feb 29 23:42:28 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pflogd.h,v 1.4 2008/06/18 09:06:26 yamt Exp $ */
+/* $NetBSD: pflogd.h,v 1.5 2012/02/29 23:42:28 joerg Exp $ */
/* $OpenBSD: pflogd.h,v 1.3 2006/01/15 16:38:04 canacar Exp $ */
/*
@@ -36,7 +36,7 @@
#define PFLOGD_MAXSNAPLEN INT_MAX
#define PFLOGD_BUFSIZE 65536 /* buffer size for incoming packets */
-void logmsg(int priority, const char *message, ...);
+void logmsg(int priority, const char *message, ...) __printflike(2, 3);
/* Privilege separation */
int priv_init(void);
Home |
Main Index |
Thread Index |
Old Index