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/grep/util.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/grep/util.c')
-rw-r--r-- | usr.bin/grep/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c index 33dc25e392d..bc132f57746 100644 --- a/usr.bin/grep/util.c +++ b/usr.bin/grep/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.47 2013/11/26 13:21:16 deraadt Exp $ */ +/* $OpenBSD: util.c,v 1.48 2014/05/20 01:25:23 guenther Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -74,7 +74,7 @@ grep_tree(char **argv) case FTS_ERR: file_err = 1; if(!sflag) - warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); + warnc(p->fts_errno, "%s", p->fts_path); break; case FTS_DP: break; |