summaryrefslogtreecommitdiffstats
path: root/usr.bin/diff
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-05-20 01:25:23 +0000
committerguenther <guenther@openbsd.org>2014-05-20 01:25:23 +0000
commit5ad04d351680822078003e2b066cfc9680d6157d (patch)
treebc78d1cc74e659478aa86d8884efcb9a0d678e50 /usr.bin/diff
parentBring UTF8_{getc,putc} up-to-date: it's been a decade since 5- and 6-byte (diff)
downloadwireguard-openbsd-5ad04d351680822078003e2b066cfc9680d6157d.tar.xz
wireguard-openbsd-5ad04d351680822078003e2b066cfc9680d6157d.zip
Use errc/warnc to simplify code.
Also, in 'ftp', always put the error message last, after the hostname/ipaddr. ok jsing@ krw@ millert@
Diffstat (limited to 'usr.bin/diff')
-rw-r--r--usr.bin/diff/diffdir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/diff/diffdir.c b/usr.bin/diff/diffdir.c
index cb8a6acd883..64b173975bd 100644
--- a/usr.bin/diff/diffdir.c
+++ b/usr.bin/diff/diffdir.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: diffdir.c,v 1.41 2012/11/29 02:15:44 guenther Exp $ */
+/* $OpenBSD: diffdir.c,v 1.42 2014/05/20 01:25:23 guenther Exp $ */
/*
* Copyright (c) 2003, 2010 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -56,7 +56,7 @@ diffdir(char *p1, char *p2, int flags)
dirlen1 = strlcpy(path1, *p1 ? p1 : ".", sizeof(path1));
if (dirlen1 >= sizeof(path1) - 1) {
- warnx("%s: %s", p1, strerror(ENAMETOOLONG));
+ warnc(ENAMETOOLONG, "%s", p1);
status = 2;
return;
}
@@ -66,7 +66,7 @@ diffdir(char *p1, char *p2, int flags)
}
dirlen2 = strlcpy(path2, *p2 ? p2 : ".", sizeof(path2));
if (dirlen2 >= sizeof(path2) - 1) {
- warnx("%s: %s", p2, strerror(ENAMETOOLONG));
+ warnc(ENAMETOOLONG, "%s", p2);
status = 2;
return;
}