svn commit: r253046 - head/sbin/devd

Alan Somers asomers at FreeBSD.org
Mon Jul 8 21:10:30 UTC 2013


Author: asomers
Date: Mon Jul  8 21:10:30 2013
New Revision: 253046
URL: http://svnweb.freebsd.org/changeset/base/253046

Log:
  Correct the printf format specifier for total_events.
  Add __printflike argument checking for devdlog().
  
  Reported by: pjd
  Approved by: gibbs (co-mentor)

Modified:
  head/sbin/devd/devd.cc

Modified: head/sbin/devd/devd.cc
==============================================================================
--- head/sbin/devd/devd.cc	Mon Jul  8 20:21:36 2013	(r253045)
+++ head/sbin/devd/devd.cc	Mon Jul  8 21:10:30 2013	(r253046)
@@ -124,7 +124,8 @@ static volatile sig_atomic_t romeo_must_
 
 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;
 		}


More information about the svn-src-all mailing list