[hackers] [sbase] Revert "If we have a match any pattern also match against blank lines" || sin

From: <git_AT_suckless.org>
Date: Wed, 20 Jan 2016 16:06:10 +0100 (CET)

commit 0e9eee4fa329f5c909f5f21abd01e8019d552213
Author: sin <sin_AT_2f30.org>
AuthorDate: Wed Jan 20 15:05:01 2016 +0000
Commit: sin <sin_AT_2f30.org>
CommitDate: Wed Jan 20 15:06:05 2016 +0000

    Revert "If we have a match any pattern also match against blank lines"
    
    Doesn't really make sense for grep . to match blank lines.

diff --git a/grep.c b/grep.c
index 9f4093c..8744fcd 100644
--- a/grep.c
+++ b/grep.c
_AT_@ -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) {
Received on Wed Jan 20 2016 - 16:06:10 CET

This archive was generated by hypermail 2.3.0 : Wed Jan 20 2016 - 16:12:41 CET