[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox-cvs
Subject: [BusyBox-cvs] busybox/findutils grep.c,1.82,1.83
From: andersen () busybox ! net (Erik Andersen,,,)
Date: 2004-05-26 3:46:46
Message-ID: 20040526094644.49506B40B3 () codepoet ! org
[Download RAW message or body]
Update of /var/cvs/busybox/findutils
In directory nail:/tmp/cvs-serv23511/findutils
Modified Files:
grep.c
Log Message:
Patch from vodz to correct 'grep -e pattern1 -e pattern2' logic
Index: grep.c
===================================================================
RCS file: /var/cvs/busybox/findutils/grep.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- a/grep.c 14 Apr 2004 17:51:10 -0000 1.82
+++ b/grep.c 26 May 2004 09:46:41 -0000 1.83
@@ -20,8 +20,8 @@
*
*/
/*
- * Jun 2003 by Vladimir Oleynik <dzo@simtreas.ru> -
- * correction "-e pattern1 -e -e pattern2" logic and more optimizations.
+ * Apr 2004 by Vladimir Oleynik <dzo@simtreas.ru> -
+ * correction "-e pattern1 -e pattern2" logic and more optimizations.
*/
#include <stdio.h>
@@ -135,11 +135,9 @@
*/
regex_t regex;
xregcomp(®ex, pattern_ptr->data, reflags);
- ret = regexec(®ex, line, 0, NULL, 0) == 0;
+ ret |= regexec(®ex, line, 0, NULL, 0) == 0;
regfree(®ex);
}
- if (!ret)
- break;
pattern_ptr = pattern_ptr->link;
} /* while (pattern_ptr) */
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic