Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/uudecode correct misuse of warnx, which leads to non...
details: https://anonhg.NetBSD.org/src/rev/61ad50700d84
branches: trunk
changeset: 533407:61ad50700d84
user: itojun <itojun%NetBSD.org@localhost>
date: Sat Jun 29 17:58:50 2002 +0000
description:
correct misuse of warnx, which leads to non-informative error
message when we specify nonexisting file as argument, like:
% uudecode hoge
uudecode: hoge
diffstat:
usr.bin/uudecode/uudecode.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 85342398768b -r 61ad50700d84 usr.bin/uudecode/uudecode.c
--- a/usr.bin/uudecode/uudecode.c Sat Jun 29 17:27:42 2002 +0000
+++ b/usr.bin/uudecode/uudecode.c Sat Jun 29 17:58:50 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uudecode.c,v 1.15 2002/06/11 06:06:21 itojun Exp $ */
+/* $NetBSD: uudecode.c,v 1.16 2002/06/29 17:58:50 itojun Exp $ */
/*-
* Copyright (c) 1983, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)uudecode.c 8.2 (Berkeley) 4/2/94";
#endif
-__RCSID("$NetBSD: uudecode.c,v 1.15 2002/06/11 06:06:21 itojun Exp $");
+__RCSID("$NetBSD: uudecode.c,v 1.16 2002/06/29 17:58:50 itojun Exp $");
#endif /* not lint */
#if HAVE_CONFIG_H
@@ -101,7 +101,7 @@
rval = 0;
do {
if (!freopen(filename = *argv, "r", stdin)) {
- warnx("%s", *argv);
+ warn("%s", *argv);
rval = 1;
continue;
}
@@ -177,7 +177,7 @@
/* create output file, set mode */
if (!pflag && (!freopen(fn, "w", stdout) ||
fchmod(fileno(stdout), mode & 0666))) {
- warnx("%s: %s", fn, filename);
+ warn("%s: %s", fn, filename);
return(1);
}
Home |
Main Index |
Thread Index |
Old Index