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.bin | |
| parent | 82cbc88d2a7761987127a50eb8d22f72dad97c6a (diff) | |
errx?/warnx? audit. do not pass variable alone, use %s. idea from openbsd
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/biff/biff.c | 8 | ||||
| -rw-r--r-- | usr.bin/chpass/chpass.c | 8 | ||||
| -rw-r--r-- | usr.bin/finger/net.c | 6 | ||||
| -rw-r--r-- | usr.bin/finger/util.c | 6 | ||||
| -rw-r--r-- | usr.bin/ftp/fetch.c | 6 | ||||
| -rw-r--r-- | usr.bin/ftp/ftp.c | 10 | ||||
| -rw-r--r-- | usr.bin/ktrace/ktrace.c | 8 | ||||
| -rw-r--r-- | usr.bin/modstat/modstat.c | 6 | ||||
| -rw-r--r-- | usr.bin/tcopy/tcopy.c | 8 | ||||
| -rw-r--r-- | usr.bin/vmstat/dkstats.c | 6 |
10 files changed, 36 insertions, 36 deletions
diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c index 618e01faa05..5267b091227 100644 --- a/usr.bin/biff/biff.c +++ b/usr.bin/biff/biff.c @@ -1,4 +1,4 @@ -/* $NetBSD: biff.c,v 1.6 1998/07/28 19:26:09 mycroft Exp $ */ +/* $NetBSD: biff.c,v 1.7 2000/07/07 15:13:21 itojun Exp $ */ /* * Copyright (c) 1980, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\ #if 0 static char sccsid[] = "@(#)biff.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: biff.c,v 1.6 1998/07/28 19:26:09 mycroft Exp $"); +__RCSID("$NetBSD: biff.c,v 1.7 2000/07/07 15:13:21 itojun Exp $"); #endif #endif /* not lint */ @@ -93,11 +93,11 @@ main(argc, argv) switch(argv[0][0]) { case 'n': if (chmod(name, sb.st_mode & ~0100) < 0) - err(2, name); + err(2, "%s", name); break; case 'y': if (chmod(name, sb.st_mode | 0100) < 0) - err(2, name); + err(2, "%s", name); break; default: usage(); diff --git a/usr.bin/chpass/chpass.c b/usr.bin/chpass/chpass.c index da5c1505df1..05d22ba0afa 100644 --- a/usr.bin/chpass/chpass.c +++ b/usr.bin/chpass/chpass.c @@ -1,4 +1,4 @@ -/* $NetBSD: chpass.c,v 1.18 1999/02/08 22:21:44 mjl Exp $ */ +/* $NetBSD: chpass.c,v 1.19 2000/07/07 15:13:22 itojun Exp $ */ /*- * Copyright (c) 1988, 1993, 1994 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)chpass.c 8.4 (Berkeley) 4/2/94"; #else -__RCSID("$NetBSD: chpass.c,v 1.18 1999/02/08 22:21:44 mjl Exp $"); +__RCSID("$NetBSD: chpass.c,v 1.19 2000/07/07 15:13:22 itojun Exp $"); #endif #endif /* not lint */ @@ -258,12 +258,12 @@ main(argc, argv) tfd = pw_lock(0); if (tfd < 0) { if (errno != EEXIST) - err(1, _PATH_MASTERPASSWD_LOCK); + err(1, "%s", _PATH_MASTERPASSWD_LOCK); warnx("The passwd file is busy, waiting..."); tfd = pw_lock(10); if (tfd < 0) { if (errno != EEXIST) - err(1, _PATH_MASTERPASSWD_LOCK); + err(1, "%s", _PATH_MASTERPASSWD_LOCK); errx(1, "The passwd file is still busy, " "try again later."); } diff --git a/usr.bin/finger/net.c b/usr.bin/finger/net.c index 8f66953d5d6..740458168b6 100644 --- a/usr.bin/finger/net.c +++ b/usr.bin/finger/net.c @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.13 1999/07/02 06:01:23 itojun Exp $ */ +/* $NetBSD: net.c,v 1.14 2000/07/07 15:13:22 itojun Exp $ */ /* * Copyright (c) 1989, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)net.c 8.4 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: net.c,v 1.13 1999/07/02 06:01:23 itojun Exp $"); +__RCSID("$NetBSD: net.c,v 1.14 2000/07/07 15:13:22 itojun Exp $"); #endif #endif /* not lint */ @@ -111,7 +111,7 @@ netfinger(name) } if (s < 0) { if (emsg != NULL) - warn(emsg); + warn("%s", emsg); return; } diff --git a/usr.bin/finger/util.c b/usr.bin/finger/util.c index 8186044cac4..194297a822d 100644 --- a/usr.bin/finger/util.c +++ b/usr.bin/finger/util.c @@ -1,4 +1,4 @@ -/* $NetBSD: util.c,v 1.15 1999/11/09 15:06:35 drochner Exp $ */ +/* $NetBSD: util.c,v 1.16 2000/07/07 15:13:22 itojun Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)util.c 8.3 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: util.c,v 1.15 1999/11/09 15:06:35 drochner Exp $"); +__RCSID("$NetBSD: util.c,v 1.16 2000/07/07 15:13:22 itojun Exp $"); #endif #endif /* not lint */ @@ -345,7 +345,7 @@ find_idle_and_ttywrite(w) (void)snprintf(tbuf, sizeof(tbuf), "%s/%s", _PATH_DEV, w->tty); if (stat(tbuf, &sb) < 0) { - warn(tbuf); + warn("%s", tbuf); return; } w->idletime = now < sb.st_atime ? 0 : now - sb.st_atime; diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index a6dabf1b437..3a300553823 100644 --- a/usr.bin/ftp/fetch.c +++ b/usr.bin/ftp/fetch.c @@ -1,4 +1,4 @@ -/* $NetBSD: fetch.c,v 1.116 2000/06/15 13:08:25 lukem Exp $ */ +/* $NetBSD: fetch.c,v 1.117 2000/07/07 15:13:23 itojun Exp $ */ /*- * Copyright (c) 1997-2000 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: fetch.c,v 1.116 2000/06/15 13:08:25 lukem Exp $"); +__RCSID("$NetBSD: fetch.c,v 1.117 2000/07/07 15:13:23 itojun Exp $"); #endif /* not lint */ /* @@ -728,7 +728,7 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth) hints.ai_protocol = 0; error = getaddrinfo(host, port, &hints, &res0); if (error) { - warnx(gai_strerror(error)); + warnx("%s", gai_strerror(error)); goto cleanup_fetch_url; } if (res0->ai_canonname) diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c index f4d6e62e4d9..5a1c8940768 100644 --- a/usr.bin/ftp/ftp.c +++ b/usr.bin/ftp/ftp.c @@ -1,4 +1,4 @@ -/* $NetBSD: ftp.c,v 1.100 2000/06/11 15:15:52 lukem Exp $ */ +/* $NetBSD: ftp.c,v 1.101 2000/07/07 15:13:24 itojun Exp $ */ /*- * Copyright (c) 1996-2000 The NetBSD Foundation, Inc. @@ -103,7 +103,7 @@ #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else -__RCSID("$NetBSD: ftp.c,v 1.100 2000/06/11 15:15:52 lukem Exp $"); +__RCSID("$NetBSD: ftp.c,v 1.101 2000/07/07 15:13:24 itojun Exp $"); #endif #endif /* not lint */ @@ -202,7 +202,7 @@ hookup(char *host, char *port) hints.ai_protocol = 0; error = getaddrinfo(host, port, &hints, &res0); if (error) { - warnx(gai_strerror(error)); + warnx("%s", gai_strerror(error)); code = -1; return (0); } @@ -271,7 +271,7 @@ hookup(char *host, char *port) break; } if (s < 0) { - warn(cause); + warn("%s", cause); code = -1; freeaddrinfo(res0); return 0; @@ -342,7 +342,7 @@ hookup(char *host, char *port) break; } if (s < 0) { - warn(cause); + warn("%s", cause); code = -1; return 0; } diff --git a/usr.bin/ktrace/ktrace.c b/usr.bin/ktrace/ktrace.c index 997d80e4a64..966f8f80323 100644 --- a/usr.bin/ktrace/ktrace.c +++ b/usr.bin/ktrace/ktrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: ktrace.c,v 1.18 2000/07/03 02:51:21 matt Exp $ */ +/* $NetBSD: ktrace.c,v 1.19 2000/07/07 15:13:24 itojun Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\ #if 0 static char sccsid[] = "@(#)ktrace.c 8.2 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: ktrace.c,v 1.18 2000/07/03 02:51:21 matt Exp $"); +__RCSID("$NetBSD: ktrace.c,v 1.19 2000/07/07 15:13:24 itojun Exp $"); #endif #endif /* not lint */ @@ -212,7 +212,7 @@ main(argc, argv) if (outfile && strcmp(outfile, "-")) { if ((fd = open(outfile, O_CREAT | O_WRONLY | (append ? 0 : O_TRUNC), DEFFILEMODE)) < 0) - err(1, outfile); + err(1, "%s", outfile); (void)close(fd); } @@ -356,6 +356,6 @@ do_ktrace(tracefile, ops, trpoints, pid) } else ret = ktrace(tracefile, ops, trpoints, pid); if (ret < 0) - err(1, tracefile); + err(1, "%s", tracefile); return 1; } diff --git a/usr.bin/modstat/modstat.c b/usr.bin/modstat/modstat.c index b758751964c..0393be56c03 100644 --- a/usr.bin/modstat/modstat.c +++ b/usr.bin/modstat/modstat.c @@ -1,4 +1,4 @@ -/* $NetBSD: modstat.c,v 1.14 1999/08/16 03:02:46 simonb Exp $ */ +/* $NetBSD: modstat.c,v 1.15 2000/07/07 15:13:25 itojun Exp $ */ /* * Copyright (c) 1993 Terrence R. Lambert. @@ -34,7 +34,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: modstat.c,v 1.14 1999/08/16 03:02:46 simonb Exp $"); +__RCSID("$NetBSD: modstat.c,v 1.15 2000/07/07 15:13:25 itojun Exp $"); #endif #include <sys/param.h> @@ -174,7 +174,7 @@ main(argc, argv) */ (void)setegid(egid); if ((devfd = open(_PATH_LKM, O_RDONLY, 0)) == -1) - err(2, _PATH_LKM); + err(2, "%s", _PATH_LKM); /* get rid of our privileges now */ setgid(getgid()); diff --git a/usr.bin/tcopy/tcopy.c b/usr.bin/tcopy/tcopy.c index 7661541424f..0f063350f79 100644 --- a/usr.bin/tcopy/tcopy.c +++ b/usr.bin/tcopy/tcopy.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcopy.c,v 1.9 1998/10/08 02:15:14 wsanchez Exp $ */ +/* $NetBSD: tcopy.c,v 1.10 2000/07/07 15:13:25 itojun Exp $ */ /* * Copyright (c) 1985, 1987, 1993, 1995 @@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 1987, 1993\n\ #if 0 static char sccsid[] = "@(#)tcopy.c 8.3 (Berkeley) 1/23/95"; #endif -__RCSID("$NetBSD: tcopy.c,v 1.9 1998/10/08 02:15:14 wsanchez Exp $"); +__RCSID("$NetBSD: tcopy.c,v 1.10 2000/07/07 15:13:25 itojun Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -133,7 +133,7 @@ main(argc, argv) inf = argv[0]; if ((outp = open(argv[1], op == VERIFY ? O_RDONLY : op == COPY ? O_WRONLY : O_RDWR, DEFFILEMODE)) < 0) { - err(3, argv[1]); + err(3, "%s", argv[1]); } break; default: @@ -141,7 +141,7 @@ main(argc, argv) } if ((inp = open(inf, O_RDONLY, 0)) < 0) - err(1, inf); + err(1, "%s", inf); buff = getspace(maxblk); diff --git a/usr.bin/vmstat/dkstats.c b/usr.bin/vmstat/dkstats.c index d84e99b8df5..4bcaf1df344 100644 --- a/usr.bin/vmstat/dkstats.c +++ b/usr.bin/vmstat/dkstats.c @@ -1,4 +1,4 @@ -/* $NetBSD: dkstats.c,v 1.8 2000/06/04 16:10:17 thorpej Exp $ */ +/* $NetBSD: dkstats.c,v 1.9 2000/07/07 15:13:25 itojun Exp $ */ /* * Copyright (c) 1996 John M. Vinopal @@ -83,8 +83,8 @@ int *dk_select; char **dr_name; #define KVM_ERROR(_string) { \ - warnx((_string)); \ - errx(1, kvm_geterr(kd)); \ + warnx("%s", (_string)); \ + errx(1, "%s", kvm_geterr(kd)); \ } /* |
