From b1162954df8eb75721a52e418a0479d808d85c9e Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 24 May 2011 11:38:56 +0000 Subject: [PATCH] Don't use address strings as format string. --- sbin/ifconfig/af_inetany.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sbin/ifconfig/af_inetany.c b/sbin/ifconfig/af_inetany.c index 43fd7e12d142..78dcd1d4628b 100644 --- a/sbin/ifconfig/af_inetany.c +++ b/sbin/ifconfig/af_inetany.c @@ -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 #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 @@ -92,9 +92,9 @@ commit_address(prop_dictionary_t env, prop_dictionary_t oenv, 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 @@ commit_address(prop_dictionary_t env, prop_dictionary_t oenv, 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); }