summaryrefslogtreecommitdiff
path: root/usr.bin/fmt
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2005-03-08 23:34:44 +0000
committerChad Loder <cloder@cvs.openbsd.org>2005-03-08 23:34:44 +0000
commit71a6c2ab9154b768ee5e0bd1daa38ca11cb76890 (patch)
tree23766b04fef9ba290e65123306513d019bffe949 /usr.bin/fmt
parent79cfeb4fc5737bbfbb8736bc9ae98951b97a91dd (diff)
weeping the tree for printf(s) where printf("%s",s) should be used.
This is a regression introduced during conversion from perror(3) to err(3) OK mickey@
Diffstat (limited to 'usr.bin/fmt')
-rw-r--r--usr.bin/fmt/fmt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/fmt/fmt.c b/usr.bin/fmt/fmt.c
index 99bb899dba5..dd6a674ea6e 100644
--- a/usr.bin/fmt/fmt.c
+++ b/usr.bin/fmt/fmt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fmt.c,v 1.22 2004/06/29 16:59:46 mickey Exp $ */
+/* $OpenBSD: fmt.c,v 1.23 2005/03/08 23:34:43 cloder Exp $ */
/* Sensible version of fmt
*
@@ -170,7 +170,7 @@
#ifndef lint
static const char rcsid[] =
- "$OpenBSD: fmt.c,v 1.22 2004/06/29 16:59:46 mickey Exp $";
+ "$OpenBSD: fmt.c,v 1.23 2005/03/08 23:34:43 cloder Exp $";
static const char copyright[] =
"Copyright (c) 1997 Gareth McCaughan. All rights reserved.\n";
#endif /* not lint */
@@ -359,7 +359,7 @@ process_named_file(const char *name)
FILE *f;
if ((f = fopen(name, "r")) == NULL) {
- warn(name);
+ warn("%s", name);
++n_errors;
} else {
process_stream(f, name);
@@ -468,7 +468,7 @@ process_stream(FILE *stream, const char *name)
new_paragraph(output_in_paragraph ? last_indent : first_indent, 0);
if (ferror(stream)) {
- warn(name);
+ warn("%s", name);
++n_errors;
}
}
@@ -633,7 +633,7 @@ center_stream(FILE *stream, const char *name)
}
if (ferror(stream)) {
- warn(name);
+ warn("%s", name);
++n_errors;
}
}