diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-05-20 01:25:25 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-05-20 01:25:25 +0000 |
commit | 597da3199199b14e2722a1ada9fccb3737814d7f (patch) | |
tree | b475f359033bb4063109bd5404e3d5a943578b0d /usr.bin/diff/diffdir.c | |
parent | f45d4774a3a08f1a090fecf301051d4c28ec94f6 (diff) |
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/diffdir.c')
-rw-r--r-- | usr.bin/diff/diffdir.c | 6 |
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; } |