summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1997-01-22 06:53:13 +0000
committermillert <millert@openbsd.org>1997-01-22 06:53:13 +0000
commitfa6350f4d409cf20a950f78a58e9c7a95f0486ab (patch)
treeb1e853b7029e6ae817127988eb88b609dfee6ce8
parentFix off-by-one differently--add an extra byte to buffer (ick). (diff)
downloadwireguard-openbsd-fa6350f4d409cf20a950f78a58e9c7a95f0486ab.tar.xz
wireguard-openbsd-fa6350f4d409cf20a950f78a58e9c7a95f0486ab.zip
Fix some err(3) usage and usage string.
-rw-r--r--usr.bin/sort/files.c8
-rw-r--r--usr.bin/sort/msort.c6
-rw-r--r--usr.bin/sort/sort.c14
3 files changed, 14 insertions, 14 deletions
diff --git a/usr.bin/sort/files.c b/usr.bin/sort/files.c
index a11a882ccae..668fb0f8cb7 100644
--- a/usr.bin/sort/files.c
+++ b/usr.bin/sort/files.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: files.c,v 1.2 1997/01/22 06:43:51 millert Exp $ */
+/* $OpenBSD: files.c,v 1.3 1997/01/22 06:53:13 millert Exp $ */
/*-
* Copyright (c) 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)files.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: files.c,v 1.2 1997/01/22 06:43:51 millert Exp $";
+static char rcsid[] = "$OpenBSD: files.c,v 1.3 1997/01/22 06:53:13 millert Exp $";
#endif
#endif /* not lint */
@@ -155,7 +155,7 @@ makeline(flno, filelist, nfiles, buffer, bufend, dummy2)
} else if (!fp) {
if (fileno >= nfiles) return(EOF);
if (!(fp = fopen(filelist.names[fileno], "r")))
- err(2, "%s", filelist.names[fileno]);
+ err(2, filelist.names[fileno]);
++fileno;
}
while ((pos < end) && ((c = getc(fp)) != EOF)) {
@@ -221,7 +221,7 @@ makekey(flno, filelist, nfiles, buffer, bufend, ftbl)
return (EOF);
dbdesc = fopen(filelist.names[fileno], "r");
if (!dbdesc)
- err(2, "%s", filelist.names[fileno]);
+ err(2, filelist.names[fileno]);
++fileno;
get = seq;
}
diff --git a/usr.bin/sort/msort.c b/usr.bin/sort/msort.c
index 5e2fc6556d6..dc3c9b3c39a 100644
--- a/usr.bin/sort/msort.c
+++ b/usr.bin/sort/msort.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msort.c,v 1.2 1997/01/22 06:43:53 millert Exp $ */
+/* $OpenBSD: msort.c,v 1.3 1997/01/22 06:53:15 millert Exp $ */
/*-
* Copyright (c) 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)msort.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: msort.c,v 1.2 1997/01/22 06:43:53 millert Exp $";
+static char rcsid[] = "$OpenBSD: msort.c,v 1.3 1997/01/22 06:53:15 millert Exp $";
#endif
#endif /* not lint */
@@ -119,7 +119,7 @@ fmerge(binno, files, nfiles, get, outfp, fput, ftbl)
for (i = 0; i < last; i++)
if (!(l_fstack[i+MAXFCT-1-16].fp =
fopen(files.names[j + i], "r")))
- err(2, "%s", files.names[j+i]);
+ err(2, files.names[j+i]);
merge(MAXFCT-1-16, last, get, tout, put, ftbl);
}
else {
diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c
index 90a21fedd50..1e5e22baaaf 100644
--- a/usr.bin/sort/sort.c
+++ b/usr.bin/sort/sort.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sort.c,v 1.1 1997/01/20 19:39:55 millert Exp $ */
+/* $OpenBSD: sort.c,v 1.2 1997/01/22 06:53:16 millert Exp $ */
/*-
* Copyright (c) 1993
@@ -46,7 +46,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)sort.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: sort.c,v 1.1 1997/01/20 19:39:55 millert Exp $";
+static char rcsid[] = "$OpenBSD: sort.c,v 1.2 1997/01/22 06:53:16 millert Exp $";
#endif
#endif /* not lint */
@@ -199,7 +199,7 @@ main(argc, argv)
argv[i] = devstdin;
}
} else if ((ch = access(argv[i], R_OK)))
- err(2, "%s", argv[i]);
+ err(2, argv[i]);
}
if (!(fldtab->flags & (I|D) || fldtab[1].icol.num)) {
SINGL_FLD = 1;
@@ -240,7 +240,7 @@ main(argc, argv)
int outfd;
errno = 0;
if (access(outpath, W_OK))
- err(2, "%s", outpath);
+ err(2, outpath);
act.sa_handler = onsig;
(void)snprintf(toutpath, sizeof(toutpath), "%sXXXX", outpath);
if ((outfd = mkstemp(toutpath)) < 0 ||
@@ -260,7 +260,7 @@ main(argc, argv)
fsort(-1, 0, filelist, argc-optind, outfp, fldtab);
if (outfile != outpath) {
if (access(outfile, 0))
- err(2, "%s", outfile);
+ err(2, outfile);
(void)unlink(outpath);
if (link(outfile, outpath))
err(2, "cannot link %s: output left in %s",
@@ -291,7 +291,7 @@ usage(msg)
{
if (msg)
(void)fprintf(stderr, "sort: %s\n", msg);
- (void)fprintf(stderr, "usage: [-o output] [-cmubdfinr] [-t char] ");
- (void)fprintf(stderr, "[-T char] [-k keydef] ... [files]\n");
+ (void)fprintf(stderr, "usage: [-T dir] [-o output] [-cmubdfinr] ");
+ (void)fprintf(stderr, "[-t char] [-R char] [-k keydef] ... [files]\n");
exit(2);
}