← Commit list

7f164cd05

Eric Andersen
Eric Andersen
2004-05-26
FAILED Duration: 50s

Subject

Patch from vodz to correct 'grep -e pattern1 -e pattern2' logic

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

findutils/grep.c+3 -5
@@ -20,8 +20,8 @@
*
*/
/*
- * Jun 2003 by Vladimir Oleynik <[email protected]> -
- * correction "-e pattern1 -e -e pattern2" logic and more optimizations.
+ * Apr 2004 by Vladimir Oleynik <[email protected]> -
+ * correction "-e pattern1 -e pattern2" logic and more optimizations.
*/
#include <stdio.h>
@@ -135,11 +135,9 @@ static int grep_file(FILE *file)
*/
regex_t regex;
xregcomp(&regex, pattern_ptr->data, reflags);
- ret = regexec(&regex, line, 0, NULL, 0) == 0;
+ ret |= regexec(&regex, line, 0, NULL, 0) == 0;
regfree(&regex);
}
- if (!ret)
- break;
pattern_ptr = pattern_ptr->link;
} /* while (pattern_ptr) */