Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/sdpd Fix format string. Make sure it doesn't reappe...
details: https://anonhg.NetBSD.org/src/rev/c642e0b20822
branches: trunk
changeset: 777702:c642e0b20822
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Mar 01 22:38:31 2012 +0000
description:
Fix format string. Make sure it doesn't reappear by using __printf_like
as appropiate.
diffstat:
usr.sbin/sdpd/sdpd.h | 18 +++++++++---------
usr.sbin/sdpd/server.c | 6 +++---
2 files changed, 12 insertions(+), 12 deletions(-)
diffs (59 lines):
diff -r d615ec36b27f -r c642e0b20822 usr.sbin/sdpd/sdpd.h
--- a/usr.sbin/sdpd/sdpd.h Thu Mar 01 22:31:48 2012 +0000
+++ b/usr.sbin/sdpd/sdpd.h Thu Mar 01 22:38:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdpd.h,v 1.1 2009/05/12 10:05:07 plunky Exp $ */
+/* $NetBSD: sdpd.h,v 1.2 2012/03/01 22:38:31 joerg Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -134,14 +134,14 @@
/* log.c */
void log_open(char const *, bool);
void log_close(void);
-void log_emerg(char const *, ...);
-void log_alert(char const *, ...);
-void log_crit(char const *, ...);
-void log_err(char const *, ...);
-void log_warning(char const *, ...);
-void log_notice(char const *, ...);
-void log_info(char const *, ...);
-void log_debug(char const *, ...);
+void log_emerg(char const *, ...) __printflike(1, 2);
+void log_alert(char const *, ...) __printflike(1, 2);
+void log_crit(char const *, ...) __printflike(1, 2);
+void log_err(char const *, ...) __printflike(1, 2);
+void log_warning(char const *, ...) __printflike(1, 2);
+void log_notice(char const *, ...) __printflike(1, 2);
+void log_info(char const *, ...) __printflike(1, 2);
+void log_debug(char const *, ...) __printflike(1, 2);
/* record.c */
uint16_t record_insert_request(server_t *, int);
diff -r d615ec36b27f -r c642e0b20822 usr.sbin/sdpd/server.c
--- a/usr.sbin/sdpd/server.c Thu Mar 01 22:31:48 2012 +0000
+++ b/usr.sbin/sdpd/server.c Thu Mar 01 22:38:31 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: server.c,v 1.10 2011/07/01 03:07:21 joerg Exp $ */
+/* $NetBSD: server.c,v 1.11 2012/03/01 22:38:31 joerg Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: server.c,v 1.10 2011/07/01 03:07:21 joerg Exp $");
+__RCSID("$NetBSD: server.c,v 1.11 2012/03/01 22:38:31 joerg Exp $");
#include <sys/select.h>
#include <sys/stat.h>
@@ -112,7 +112,7 @@
srv->ctllen = CMSG_SPACE(SOCKCREDSIZE(MAX_GROUPS));
srv->ctlbuf = malloc(srv->ctllen);
if (srv->ctlbuf == NULL) {
- log_crit("Malloc cmsg buffer (len=%d) failed.", srv->ctllen);
+ log_crit("Malloc cmsg buffer (len=%zu) failed.", srv->ctllen);
goto fail;
}
Home |
Main Index |
Thread Index |
Old Index