Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/ifconfig Don't use address strings as format string.
details: https://anonhg.NetBSD.org/src/rev/caffdb00ed8c
branches: trunk
changeset: 765320:caffdb00ed8c
user: joerg <joerg%NetBSD.org@localhost>
date: Tue May 24 11:38:56 2011 +0000
description:
Don't use address strings as format string.
diffstat:
sbin/ifconfig/af_inetany.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (55 lines):
diff -r 60ea96d4ecaf -r caffdb00ed8c sbin/ifconfig/af_inetany.c
--- a/sbin/ifconfig/af_inetany.c Tue May 24 10:08:03 2011 +0000
+++ b/sbin/ifconfig/af_inetany.c Tue May 24 11:38:56 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: af_inetany.c,v 1.13 2010/12/13 17:35:08 pooka Exp $ */
+/* $NetBSD: af_inetany.c,v 1.14 2011/05/24 11:38:56 joerg Exp $ */
/*-
* Copyright (c) 2008 David Young. All rights reserved.
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: af_inetany.c,v 1.13 2010/12/13 17:35:08 pooka Exp $");
+__RCSID("$NetBSD: af_inetany.c,v 1.14 2011/05/24 11:38:56 joerg Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -92,9 +92,9 @@
param->gifaddr.cmd == 0)
return;
else if (prog_ioctl(s, param->gifaddr.cmd, param->dgreq.buf) == -1)
- err(EXIT_FAILURE, param->gifaddr.desc);
+ err(EXIT_FAILURE, "%s", param->gifaddr.desc);
else if (prog_ioctl(s, param->difaddr.cmd, param->dgreq.buf) == -1)
- err(EXIT_FAILURE, param->difaddr.desc);
+ err(EXIT_FAILURE, "%s", param->difaddr.desc);
else
return;
@@ -157,20 +157,20 @@
if (prog_ioctl(s, param->gifaddr.cmd, param->dgreq.buf) == 0) {
rc = prog_ioctl(s, param->difaddr.cmd, param->dgreq.buf);
if (rc == -1)
- err(EXIT_FAILURE, param->difaddr.desc);
+ err(EXIT_FAILURE, "%s", param->difaddr.desc);
} else if (errno == EADDRNOTAVAIL)
; /* No address was assigned yet. */
else
- err(EXIT_FAILURE, param->gifaddr.desc);
+ err(EXIT_FAILURE, "%s", param->gifaddr.desc);
} else if (delete) {
loadbuf(¶m->dgaddr, addr);
if (prog_ioctl(s, param->difaddr.cmd, param->dgreq.buf) == -1)
- err(EXIT_FAILURE, param->difaddr.desc);
+ err(EXIT_FAILURE, "%s", param->difaddr.desc);
return;
}
if (param->pre_aifaddr != NULL &&
(*param->pre_aifaddr)(env, param) == -1)
err(EXIT_FAILURE, "pre-%s", param->aifaddr.desc);
if (prog_ioctl(s, param->aifaddr.cmd, param->req.buf) == -1)
- err(EXIT_FAILURE, param->aifaddr.desc);
+ err(EXIT_FAILURE, "%s", param->aifaddr.desc);
}
Home |
Main Index |
Thread Index |
Old Index