diff options
| author | itojun <itojun@NetBSD.org> | 2000-07-07 15:10:32 +0000 |
|---|---|---|
| committer | itojun <itojun@NetBSD.org> | 2000-07-07 15:10:32 +0000 |
| commit | bbef2fbaacededb5eb9a0855d32a09e3b032f2c5 (patch) | |
| tree | 803ad37661cca887d0d2f9ba989c9e4fac0d3b4f /usr.sbin | |
| parent | 82cbc88d2a7761987127a50eb8d22f72dad97c6a (diff) | |
errx?/warnx? audit. do not pass variable alone, use %s. idea from openbsd
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/eeprom/eehandlers.c | 6 | ||||
| -rw-r--r-- | usr.sbin/eeprom/main.c | 6 | ||||
| -rw-r--r-- | usr.sbin/netgroup_mkdb/netgroup_mkdb.c | 8 | ||||
| -rw-r--r-- | usr.sbin/pwd_mkdb/pwd_mkdb.c | 4 | ||||
| -rw-r--r-- | usr.sbin/quotaon/quotaon.c | 6 | ||||
| -rw-r--r-- | usr.sbin/rdate/rdate.c | 6 | ||||
| -rw-r--r-- | usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c | 4 | ||||
| -rw-r--r-- | usr.sbin/wsconscfg/wsconscfg.c | 4 | ||||
| -rw-r--r-- | usr.sbin/ypserv/revnetgroup/revnetgroup.c | 6 |
9 files changed, 25 insertions, 25 deletions
diff --git a/usr.sbin/eeprom/eehandlers.c b/usr.sbin/eeprom/eehandlers.c index 20a19af83dc..483ae4d283f 100644 --- a/usr.sbin/eeprom/eehandlers.c +++ b/usr.sbin/eeprom/eehandlers.c @@ -1,4 +1,4 @@ -/* $NetBSD: eehandlers.c,v 1.6 1997/10/18 08:40:40 lukem Exp $ */ +/* $NetBSD: eehandlers.c,v 1.7 2000/07/07 15:11:44 itojun Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -78,14 +78,14 @@ static int doio __P((struct keytabent *, u_char *, ssize_t, int)); } #define FAILEDREAD(kt) { \ - warnx(err_str); \ + warnx("%s", err_str); \ warnx("failed to read field `%s'", (kt)->kt_keyword); \ ++eval; \ return; \ } #define FAILEDWRITE(kt) { \ - warnx(err_str); \ + warnx("%s", err_str); \ warnx("failed to update field `%s'", (kt)->kt_keyword); \ ++eval; \ return; \ diff --git a/usr.sbin/eeprom/main.c b/usr.sbin/eeprom/main.c index d8b36b621c6..4ab064db5a7 100644 --- a/usr.sbin/eeprom/main.c +++ b/usr.sbin/eeprom/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.8 1997/10/18 08:40:49 lukem Exp $ */ +/* $NetBSD: main.c,v 1.9 2000/07/07 15:11:45 itojun Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #ifndef lint __COPYRIGHT( "@(#) Copyright (c) 1996 The NetBSD Foundation, Inc. All rights reserved."); -__RCSID("$NetBSD: main.c,v 1.8 1997/10/18 08:40:49 lukem Exp $"); +__RCSID("$NetBSD: main.c,v 1.9 2000/07/07 15:11:45 itojun Exp $"); #endif #include <sys/param.h> @@ -271,7 +271,7 @@ action(line) * the generic op_handler. */ if ((cp = op_handler(keyword, arg)) != NULL) - warnx(cp); + warnx("%s", cp); return; } else #endif /* __sparc__ */ diff --git a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c index 5220a56b690..bffecbe1b44 100644 --- a/usr.sbin/netgroup_mkdb/netgroup_mkdb.c +++ b/usr.sbin/netgroup_mkdb/netgroup_mkdb.c @@ -1,4 +1,4 @@ -/* $NetBSD: netgroup_mkdb.c,v 1.9 1999/11/28 04:40:21 lukem Exp $ */ +/* $NetBSD: netgroup_mkdb.c,v 1.10 2000/07/07 15:11:46 itojun Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: netgroup_mkdb.c,v 1.9 1999/11/28 04:40:21 lukem Exp $"); +__RCSID("$NetBSD: netgroup_mkdb.c,v 1.10 2000/07/07 15:11:46 itojun Exp $"); #endif #include <sys/types.h> @@ -168,7 +168,7 @@ main(argc, argv) db = dbopen(buf, O_RDWR | O_CREAT | O_EXCL, (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH), DB_HASH, NULL); if (!db) - err(1, buf); + err(1, "%s", buf); ng_write(db, ndb, _NG_KEYBYNAME); ng_rwrite(db, udb, _NG_KEYBYUSER); @@ -215,7 +215,7 @@ ng_load(fname) /* Open the netgroup file */ if ((fp = fopen(fname, "r")) == NULL) - err(1, fname); + err(1, "%s", fname); db = dbopen(NULL, O_RDWR | O_CREAT | O_EXCL, 0, DB_HASH, NULL); diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index ad39a168046..20b5705d862 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.c +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 2000\n\ Copyright (c) 1991, 1993, 1994\n\ The Regents of the University of California. All rights reserved.\n"); __SCCSID("from: @(#)pwd_mkdb.c 8.5 (Berkeley) 4/20/94"); -__RCSID("$NetBSD: pwd_mkdb.c,v 1.17 2000/01/23 19:59:33 mycroft Exp $"); +__RCSID("$NetBSD: pwd_mkdb.c,v 1.18 2000/07/07 15:11:46 itojun Exp $"); #endif /* not lint */ #include <sys/param.h> @@ -503,7 +503,7 @@ error(name) char *name; { - warn(name); + warn("%s", name); cleanup(); #ifdef think_about_this_a_while_longer fputs("NOTE: possible inconsistencies between text files and databases\n", stderr); diff --git a/usr.sbin/quotaon/quotaon.c b/usr.sbin/quotaon/quotaon.c index 3f54ec0ba5c..05a85183dc0 100644 --- a/usr.sbin/quotaon/quotaon.c +++ b/usr.sbin/quotaon/quotaon.c @@ -1,4 +1,4 @@ -/* $NetBSD: quotaon.c,v 1.14 2000/07/04 20:27:39 matt Exp $ */ +/* $NetBSD: quotaon.c,v 1.15 2000/07/07 15:11:46 itojun Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1990, 1993\n\ #if 0 static char sccsid[] = "@(#)quotaon.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: quotaon.c,v 1.14 2000/07/04 20:27:39 matt Exp $"); +__RCSID("$NetBSD: quotaon.c,v 1.15 2000/07/07 15:11:46 itojun Exp $"); #endif #endif /* not lint */ @@ -176,7 +176,7 @@ quotaonoff(fs, offmode, type, qfpathname) return (1); if (offmode) { if (quotactl(fs->fs_file, QCMD(Q_QUOTAOFF, type), 0, 0) < 0) { - warn(fs->fs_file); + warn("%s", fs->fs_file); return (1); } if (vflag) diff --git a/usr.sbin/rdate/rdate.c b/usr.sbin/rdate/rdate.c index 222b51b1142..52950083c14 100644 --- a/usr.sbin/rdate/rdate.c +++ b/usr.sbin/rdate/rdate.c @@ -1,4 +1,4 @@ -/* $NetBSD: rdate.c,v 1.10 2000/02/05 22:14:20 kleink Exp $ */ +/* $NetBSD: rdate.c,v 1.11 2000/07/07 15:11:47 itojun Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: rdate.c,v 1.10 2000/02/05 22:14:20 kleink Exp $"); +__RCSID("$NetBSD: rdate.c,v 1.11 2000/07/07 15:11:47 itojun Exp $"); #endif/* lint */ #include <sys/types.h> @@ -142,7 +142,7 @@ main(argc, argv) break; } if (s < 0) - err(1, emsg); + err(1, "%s", emsg); if (read(s, &tim, sizeof(time_t)) != sizeof(time_t)) err(1, "Could not read data"); diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c b/usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c index eaef91a75a1..c7069c44d81 100644 --- a/usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c +++ b/usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c @@ -1,4 +1,4 @@ -/* $NetBSD: yppasswdd_mkpw.c,v 1.5 2000/07/04 20:27:39 matt Exp $ */ +/* $NetBSD: yppasswdd_mkpw.c,v 1.6 2000/07/07 15:11:47 itojun Exp $ */ /* * Copyright (c) 1996 Jason R. Thorpe <thorpej@NetBSD.ORG> @@ -108,7 +108,7 @@ make_passwd(argp, rqstp, transp) pfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0); if (pfd < 0) { pw_abort(); - warnx(_PATH_MASTERPASSWD); + warnx("%s", _PATH_MASTERPASSWD); RETURN(1); } diff --git a/usr.sbin/wsconscfg/wsconscfg.c b/usr.sbin/wsconscfg/wsconscfg.c index 811315146d7..7ab008d0d76 100644 --- a/usr.sbin/wsconscfg/wsconscfg.c +++ b/usr.sbin/wsconscfg/wsconscfg.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsconscfg.c,v 1.6 2000/07/04 20:27:40 matt Exp $ */ +/* $NetBSD: wsconscfg.c,v 1.7 2000/07/07 15:11:47 itojun Exp $ */ /* * Copyright (c) 1999 @@ -120,7 +120,7 @@ main(argc, argv) wsfd = open(wsdev, O_RDWR, 0); if (wsfd < 0) - err(2, wsdev); + err(2, "%s", wsdev); if (kbd) { if (mux) diff --git a/usr.sbin/ypserv/revnetgroup/revnetgroup.c b/usr.sbin/ypserv/revnetgroup/revnetgroup.c index ec5ec946006..d3048476583 100644 --- a/usr.sbin/ypserv/revnetgroup/revnetgroup.c +++ b/usr.sbin/ypserv/revnetgroup/revnetgroup.c @@ -1,4 +1,4 @@ -/* $NetBSD: revnetgroup.c,v 1.7 1999/07/25 09:01:05 lukem Exp $ */ +/* $NetBSD: revnetgroup.c,v 1.8 2000/07/07 15:11:48 itojun Exp $ */ /* * Copyright (c) 1995 @@ -41,7 +41,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: revnetgroup.c,v 1.7 1999/07/25 09:01:05 lukem Exp $"); +__RCSID("$NetBSD: revnetgroup.c,v 1.8 2000/07/07 15:11:48 itojun Exp $"); #endif #include <ctype.h> @@ -129,7 +129,7 @@ main(argc, argv) if (strcmp(netgroup, "-")) { if ((fp = fopen(netgroup, "r")) == NULL) { - err(1,netgroup); + err(1, "%s", netgroup); } } else { fp = stdin; |
