Do not exit if a file is not readable. This is a short hack
until someone rewrite wc(1).
This commit is contained in:
parent
6d4bca5b8a
commit
a0d038a406
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=15179
@ -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;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user