summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2004-12-13 20:22:52 +0000
committerotto <otto@openbsd.org>2004-12-13 20:22:52 +0000
commit5d420737a757223cf2060a0838da3de950def9cc (patch)
tree8670792a263e587d71a205fe0f52ea792f9b30ef
parentget rid of void* arithmetic to nuke another gcc warning (diff)
downloadwireguard-openbsd-5d420737a757223cf2060a0838da3de950def9cc.tar.xz
wireguard-openbsd-5d420737a757223cf2060a0838da3de950def9cc.zip
Use warnx() instead of warn() in four places where we know errno is zero.
ok henning@ fgsch@ pedro@ millert@
-rw-r--r--bin/mv/mv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/mv/mv.c b/bin/mv/mv.c
index 352535b41e3..b7893b144d1 100644
--- a/bin/mv/mv.c
+++ b/bin/mv/mv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mv.c,v 1.29 2003/07/29 00:24:15 deraadt Exp $ */
+/* $OpenBSD: mv.c,v 1.30 2004/12/13 20:22:52 otto Exp $ */
/* $NetBSD: mv.c,v 1.9 1995/03/21 09:06:52 cgd Exp $ */
/*
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)mv.c 8.2 (Berkeley) 4/2/94";
#else
-static char rcsid[] = "$OpenBSD: mv.c,v 1.29 2003/07/29 00:24:15 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: mv.c,v 1.30 2004/12/13 20:22:52 otto Exp $";
#endif
#endif /* not lint */
@@ -367,11 +367,11 @@ copy(char *from, char *to)
return (1);
}
if (!WIFEXITED(status)) {
- warn("%s: did not terminate normally", _PATH_CP);
+ warnx("%s: did not terminate normally", _PATH_CP);
return (1);
}
if (WEXITSTATUS(status)) {
- warn("%s: terminated with %d (non-zero) status",
+ warnx("%s: terminated with %d (non-zero) status",
_PATH_CP, WEXITSTATUS(status));
return (1);
}
@@ -385,11 +385,11 @@ copy(char *from, char *to)
return (1);
}
if (!WIFEXITED(status)) {
- warn("%s: did not terminate normally", _PATH_RM);
+ warnx("%s: did not terminate normally", _PATH_RM);
return (1);
}
if (WEXITSTATUS(status)) {
- warn("%s: terminated with %d (non-zero) status",
+ warnx("%s: terminated with %d (non-zero) status",
_PATH_RM, WEXITSTATUS(status));
return (1);
}