Correct the printf format specifier for total_events.

Add __printflike argument checking for devdlog().

Reported by: pjd
Approved by: gibbs (co-mentor)
This commit is contained in:
Alan Somers 2013-07-08 21:10:30 +00:00
parent 7ce75e5f1f
commit 3449b15aa2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=253046

View File

@ -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;
}