1
0
mirror of git://git.suckless.org/sbase synced 2024-12-21 22:50:16 +00:00

grep: Fix exit status on use of -l

This commit is contained in:
Richard Ipsum 2019-05-20 17:21:08 +01:00 committed by Michael Forney
parent 5b92551057
commit 036449cdf1

2
grep.c
View File

@ -135,6 +135,7 @@ grep(FILE *fp, const char *str)
}
}
if (match != vflag) {
result = Match;
switch (mode) {
case 'c':
c++;
@ -152,7 +153,6 @@ grep(FILE *fp, const char *str)
puts(buf);
break;
}
result = Match;
}
}
if (mode == 'c')