From 801a6742bc5d69b3293dc04787d4cd932512f6de Mon Sep 17 00:00:00 2001 From: asomers Date: Mon, 8 Jul 2013 21:10:30 +0000 Subject: Correct the printf format specifier for total_events. Add __printflike argument checking for devdlog(). Reported by: pjd Approved by: gibbs (co-mentor) --- sbin/devd/devd.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sbin/devd') diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index 0f11a83..447ab87 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -124,7 +124,8 @@ static volatile sig_atomic_t romeo_must_die = 0; static const char *configfile = CF; -static void devdlog(int priority, const char* message, ...); +static void devdlog(int priority, const char* message, ...) + __printflike(2, 3); static void event_loop(void); static void usage(void); @@ -969,7 +970,7 @@ event_loop(void) } rv = select(max_fd, &fds, NULL, NULL, &tv); if (got_siginfo) { - devdlog(LOG_INFO, "Events received so far=%ld\n", + devdlog(LOG_INFO, "Events received so far=%u\n", total_events); got_siginfo = 0; } -- cgit v1.1