Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin Properly use format strings



details:   https://anonhg.NetBSD.org/src/rev/c3ee3e043286
branches:  trunk
changeset: 765347:c3ee3e043286
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue May 24 13:26:41 2011 +0000

description:
Properly use format strings

diffstat:

 usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c |  6 +++---
 usr.sbin/syslogd/tls.c                 |  8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r 5e0fb30d4f9b -r c3ee3e043286 usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c
--- a/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c    Tue May 24 13:26:04 2011 +0000
+++ b/usr.sbin/rpc.yppasswdd/rpc.yppasswdd.c    Tue May 24 13:26:41 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rpc.yppasswdd.c,v 1.13 2009/10/20 00:51:14 snj Exp $   */
+/*     $NetBSD: rpc.yppasswdd.c,v 1.14 2011/05/24 13:27:16 joerg Exp $ */
 
 /*
  * Copyright (c) 1994 Mats O Jansson <moj%stacken.kth.se@localhost>
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: rpc.yppasswdd.c,v 1.13 2009/10/20 00:51:14 snj Exp $");
+__RCSID("$NetBSD: rpc.yppasswdd.c,v 1.14 2011/05/24 13:27:16 joerg Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -93,7 +93,7 @@
 
                                arglen = strlen(argv[i]);
                                if ((len + arglen) > (int)(sizeof(make_arg) - 2))
-                                       errx(EXIT_FAILURE, strerror(E2BIG));
+                                       errx(EXIT_FAILURE, "%s", strerror(E2BIG));
                                make_arg[len++] = ' ';
                                (void)strcpy(&make_arg[len], argv[i]);
                                len += arglen;
diff -r 5e0fb30d4f9b -r c3ee3e043286 usr.sbin/syslogd/tls.c
--- a/usr.sbin/syslogd/tls.c    Tue May 24 13:26:04 2011 +0000
+++ b/usr.sbin/syslogd/tls.c    Tue May 24 13:26:41 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tls.c,v 1.5 2010/05/13 17:52:12 tnozaki Exp $  */
+/*     $NetBSD: tls.c,v 1.6 2011/05/24 13:26:41 joerg Exp $    */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tls.c,v 1.5 2010/05/13 17:52:12 tnozaki Exp $");
+__RCSID("$NetBSD: tls.c,v 1.6 2011/05/24 13:26:41 joerg Exp $");
 
 #ifndef DISABLE_TLS
 #include "syslogd.h"
@@ -829,7 +829,7 @@
        error = getaddrinfo(bindhostname, (port ? port : "syslog-tls"),
            &hints, &res);
        if (error) {
-               logerror(gai_strerror(error));
+               logerror("%s", gai_strerror(error));
                errno = 0;
                die(0, 0, NULL);
        }
@@ -989,7 +989,7 @@
        error = getaddrinfo(conn_info->hostname,
            (conn_info->port ? conn_info->port : "syslog-tls"), &hints, &res);
        if (error) {
-               logerror(gai_strerror(error));
+               logerror("%s", gai_strerror(error));
                return false;
        }
 



Home | Main Index | Thread Index | Old Index