diff options
Diffstat (limited to 'usr.bin/wc')
-rw-r--r-- | usr.bin/wc/wc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/wc/wc.c b/usr.bin/wc/wc.c index 1f1c9b3..abc258b 100644 --- a/usr.bin/wc/wc.c +++ b/usr.bin/wc/wc.c @@ -129,8 +129,10 @@ cnt(file) fd = STDIN_FILENO; linect = wordct = charct = 0; if (file) { - if ((fd = open(file, O_RDONLY, 0)) < 0) - err("%s: %s", file, strerror(errno)); + if ((fd = open(file, O_RDONLY, 0)) < 0) { + warn("%s", file); + return; + } if (doword) goto word; /* |