summaryrefslogtreecommitdiffstats
path: root/sbin/devd
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2013-07-08 21:10:30 +0000
committerasomers <asomers@FreeBSD.org>2013-07-08 21:10:30 +0000
commit801a6742bc5d69b3293dc04787d4cd932512f6de (patch)
tree5343ba024c694ea7b46006ec4968f4f1e94f226e /sbin/devd
parentc91c27e5e002f330c8ea26265679580b16e36b3b (diff)
downloadFreeBSD-src-801a6742bc5d69b3293dc04787d4cd932512f6de.zip
FreeBSD-src-801a6742bc5d69b3293dc04787d4cd932512f6de.tar.gz
Correct the printf format specifier for total_events.
Add __printflike argument checking for devdlog(). Reported by: pjd Approved by: gibbs (co-mentor)
Diffstat (limited to 'sbin/devd')
-rw-r--r--sbin/devd/devd.cc5
1 files changed, 3 insertions, 2 deletions
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;
}
OpenPOWER on IntegriCloud