Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.bin pullup (approved by releng-1-5)
details: https://anonhg.NetBSD.org/src/rev/e41004ab9dc7
branches: netbsd-1-5
changeset: 488786:e41004ab9dc7
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Jul 28 01:09:28 2000 +0000
description:
pullup (approved by releng-1-5)
printf-like format pedant. do not pass string variable alone. use "%s".
from openbsd.
/cvsroot/basesrc/usr.bin/biff/biff.c 1.6 -> 1.7
/cvsroot/basesrc/usr.bin/chpass/chpass.c 1.18 -> 1.19
/cvsroot/basesrc/usr.bin/finger/net.c 1.13 -> 1.14
/cvsroot/basesrc/usr.bin/finger/util.c 1.15 -> 1.16
/cvsroot/basesrc/usr.bin/hexdump/display.c 1.8 -> 1.9
/cvsroot/basesrc/usr.bin/ktrace/ktrace.c 1.18 -> 1.19
/cvsroot/basesrc/usr.bin/mail/lex.c 1.14 -> 1.15
/cvsroot/basesrc/usr.bin/modstat/modstat.c 1.14 -> 1.15
/cvsroot/basesrc/usr.bin/tcopy/tcopy.c 1.9 -> 1.10
/cvsroot/basesrc/usr.bin/tn3270/ascii/map3270.c 1.7 -> 1.8
/cvsroot/basesrc/usr.bin/tn3270/tools/mkmake/mkmake.y 1.7 -> 1.8
/cvsroot/basesrc/usr.bin/vmstat/dkstats.c 1.8 -> 1.9
diffstat:
usr.bin/biff/biff.c | 8 ++++----
usr.bin/chpass/chpass.c | 8 ++++----
usr.bin/finger/net.c | 6 +++---
usr.bin/finger/util.c | 6 +++---
usr.bin/hexdump/display.c | 8 ++++----
usr.bin/ktrace/ktrace.c | 8 ++++----
usr.bin/mail/lex.c | 6 +++---
usr.bin/modstat/modstat.c | 6 +++---
usr.bin/tcopy/tcopy.c | 8 ++++----
usr.bin/tn3270/ascii/map3270.c | 6 +++---
usr.bin/tn3270/tools/mkmake/mkmake.y | 12 ++++++------
usr.bin/vmstat/dkstats.c | 6 +++---
12 files changed, 44 insertions(+), 44 deletions(-)
diffs (truncated from 380 to 300 lines):
diff -r d00a4e5438f4 -r e41004ab9dc7 usr.bin/biff/biff.c
--- a/usr.bin/biff/biff.c Fri Jul 28 01:06:23 2000 +0000
+++ b/usr.bin/biff/biff.c Fri Jul 28 01:09:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: biff.c,v 1.6 1998/07/28 19:26:09 mycroft Exp $ */
+/* $NetBSD: biff.c,v 1.6.10.1 2000/07/28 01:09:28 itojun Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@
#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.6.10.1 2000/07/28 01:09:28 itojun Exp $");
#endif
#endif /* not lint */
@@ -93,11 +93,11 @@
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 -r d00a4e5438f4 -r e41004ab9dc7 usr.bin/chpass/chpass.c
--- a/usr.bin/chpass/chpass.c Fri Jul 28 01:06:23 2000 +0000
+++ b/usr.bin/chpass/chpass.c Fri Jul 28 01:09:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: chpass.c,v 1.18 1999/02/08 22:21:44 mjl Exp $ */
+/* $NetBSD: chpass.c,v 1.18.10.1 2000/07/28 01:09:28 itojun Exp $ */
/*-
* Copyright (c) 1988, 1993, 1994
@@ -43,7 +43,7 @@
#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.18.10.1 2000/07/28 01:09:28 itojun Exp $");
#endif
#endif /* not lint */
@@ -258,12 +258,12 @@
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 -r d00a4e5438f4 -r e41004ab9dc7 usr.bin/finger/net.c
--- a/usr.bin/finger/net.c Fri Jul 28 01:06:23 2000 +0000
+++ b/usr.bin/finger/net.c Fri Jul 28 01:09:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: net.c,v 1.13 1999/07/02 06:01:23 itojun Exp $ */
+/* $NetBSD: net.c,v 1.13.8.1 2000/07/28 01:09:29 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.13.8.1 2000/07/28 01:09:29 itojun Exp $");
#endif
#endif /* not lint */
@@ -111,7 +111,7 @@
}
if (s < 0) {
if (emsg != NULL)
- warn(emsg);
+ warn("%s", emsg);
return;
}
diff -r d00a4e5438f4 -r e41004ab9dc7 usr.bin/finger/util.c
--- a/usr.bin/finger/util.c Fri Jul 28 01:06:23 2000 +0000
+++ b/usr.bin/finger/util.c Fri Jul 28 01:09:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.15 1999/11/09 15:06:35 drochner Exp $ */
+/* $NetBSD: util.c,v 1.15.4.1 2000/07/28 01:09:29 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.15.4.1 2000/07/28 01:09:29 itojun Exp $");
#endif
#endif /* not lint */
@@ -345,7 +345,7 @@
(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 -r d00a4e5438f4 -r e41004ab9dc7 usr.bin/hexdump/display.c
--- a/usr.bin/hexdump/display.c Fri Jul 28 01:06:23 2000 +0000
+++ b/usr.bin/hexdump/display.c Fri Jul 28 01:09:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: display.c,v 1.8 1999/11/09 15:06:36 drochner Exp $ */
+/* $NetBSD: display.c,v 1.8.4.1 2000/07/28 01:09:29 itojun Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)display.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: display.c,v 1.8 1999/11/09 15:06:36 drochner Exp $");
+__RCSID("$NetBSD: display.c,v 1.8.4.1 2000/07/28 01:09:29 itojun Exp $");
#endif
#endif /* not lint */
@@ -111,7 +111,7 @@
(void)printf(pr->fmt, (quad_t)eaddress);
break;
case F_TEXT:
- (void)printf(pr->fmt);
+ (void)printf("%s", pr->fmt);
break;
}
}
@@ -182,7 +182,7 @@
(void)printf(pr->fmt, (char *)bp);
break;
case F_TEXT:
- (void)printf(pr->fmt);
+ (void)printf("%s", pr->fmt);
break;
case F_U:
conv_u(pr, bp);
diff -r d00a4e5438f4 -r e41004ab9dc7 usr.bin/ktrace/ktrace.c
--- a/usr.bin/ktrace/ktrace.c Fri Jul 28 01:06:23 2000 +0000
+++ b/usr.bin/ktrace/ktrace.c Fri Jul 28 01:09:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ktrace.c,v 1.17 2000/05/27 00:45:37 sommerfeld Exp $ */
+/* $NetBSD: ktrace.c,v 1.17.4.1 2000/07/28 01:09:29 itojun Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)ktrace.c 8.2 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: ktrace.c,v 1.17 2000/05/27 00:45:37 sommerfeld Exp $");
+__RCSID("$NetBSD: ktrace.c,v 1.17.4.1 2000/07/28 01:09:29 itojun Exp $");
#endif
#endif /* not lint */
@@ -211,7 +211,7 @@
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);
}
@@ -355,6 +355,6 @@
} else
ret = ktrace(tracefile, ops, trpoints, pid);
if (ret < 0)
- err(1, tracefile);
+ err(1, "%s", tracefile);
return 1;
}
diff -r d00a4e5438f4 -r e41004ab9dc7 usr.bin/mail/lex.c
--- a/usr.bin/mail/lex.c Fri Jul 28 01:06:23 2000 +0000
+++ b/usr.bin/mail/lex.c Fri Jul 28 01:09:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.14 2000/01/21 17:08:35 mycroft Exp $ */
+/* $NetBSD: lex.c,v 1.14.4.1 2000/07/28 01:09:29 itojun Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95";
#else
-__RCSID("$NetBSD: lex.c,v 1.14 2000/01/21 17:08:35 mycroft Exp $");
+__RCSID("$NetBSD: lex.c,v 1.14.4.1 2000/07/28 01:09:29 itojun Exp $");
#endif
#endif /* not lint */
@@ -232,7 +232,7 @@
if ((value("autoinc") != NOSTR) && (incfile() > 0))
printf("New mail has arrived.\n");
reset_on_stop = 1;
- printf(prompt);
+ printf("%s", prompt);
}
fflush(stdout);
sreset();
diff -r d00a4e5438f4 -r e41004ab9dc7 usr.bin/modstat/modstat.c
--- a/usr.bin/modstat/modstat.c Fri Jul 28 01:06:23 2000 +0000
+++ b/usr.bin/modstat/modstat.c Fri Jul 28 01:09:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: modstat.c,v 1.14 1999/08/16 03:02:46 simonb Exp $ */
+/* $NetBSD: modstat.c,v 1.14.8.1 2000/07/28 01:09:29 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.14.8.1 2000/07/28 01:09:29 itojun Exp $");
#endif
#include <sys/param.h>
@@ -174,7 +174,7 @@
*/
(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 -r d00a4e5438f4 -r e41004ab9dc7 usr.bin/tcopy/tcopy.c
--- a/usr.bin/tcopy/tcopy.c Fri Jul 28 01:06:23 2000 +0000
+++ b/usr.bin/tcopy/tcopy.c Fri Jul 28 01:09:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tcopy.c,v 1.9 1998/10/08 02:15:14 wsanchez Exp $ */
+/* $NetBSD: tcopy.c,v 1.9.10.1 2000/07/28 01:09:30 itojun Exp $ */
/*
* Copyright (c) 1985, 1987, 1993, 1995
@@ -43,7 +43,7 @@
#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.9.10.1 2000/07/28 01:09:30 itojun Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -133,7 +133,7 @@
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 @@
}
if ((inp = open(inf, O_RDONLY, 0)) < 0)
- err(1, inf);
+ err(1, "%s", inf);
buff = getspace(maxblk);
diff -r d00a4e5438f4 -r e41004ab9dc7 usr.bin/tn3270/ascii/map3270.c
--- a/usr.bin/tn3270/ascii/map3270.c Fri Jul 28 01:06:23 2000 +0000
+++ b/usr.bin/tn3270/ascii/map3270.c Fri Jul 28 01:09:28 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: map3270.c,v 1.7 1998/11/06 20:03:08 christos Exp $ */
+/* $NetBSD: map3270.c,v 1.7.10.1 2000/07/28 01:09:30 itojun Exp $ */
/*-
* Copyright (c) 1988 The Regents of the University of California.
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)map3270.c 4.2 (Berkeley) 4/26/91";
#else
-__RCSID("$NetBSD: map3270.c,v 1.7 1998/11/06 20:03:08 christos Exp $");
+__RCSID("$NetBSD: map3270.c,v 1.7.10.1 2000/07/28 01:09:30 itojun Exp $");
#endif
#endif /* not lint */
@@ -103,7 +103,7 @@
char array[500]; /* character string */
Home |
Main Index |
Thread Index |
Old Index