Revert "If we have a match any pattern also match against blank lines"

Doesn't really make sense for grep . to match blank lines.
This commit is contained in:
sin 2016-01-20 15:05:01 +00:00
parent cf868c8eeb
commit 0e9eee4fa3
1 changed files with 1 additions and 1 deletions

2
grep.c
View File

@ -115,7 +115,7 @@ grep(FILE *fp, const char *str)
buf[len - 1] = '\0';
SLIST_FOREACH(pnode, &phead, entry) {
if (!Fflag) {
if (regexec(&pnode->preg, buf[0] == '\0' ? "\n" : buf, 0, NULL, 0) ^ vflag)
if (regexec(&pnode->preg, buf, 0, NULL, 0) ^ vflag)
continue;
} else {
if (!xflag) {