Skip to content

grep: introduce and use grep_and_expr()

Taylor Blau git 2 versions New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 5 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2grep: extract grep_binexp() from grep_or_expr()grep.c+9 -20 replies
2/2grep: use grep_and_expr() in compile_pattern_and()grep.c+7 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] grep: introduce and use grep_and_expr()

This small reroll fixes an issue in the second patch where a stack variable was left unused.

Taylor Blau (2):
grep: extract grep_binexp() from grep_or_expr()
grep: use grep_and_expr() in compile_pattern_and()

 grep.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)

Range-diff against v1:

-:  ---------- > 1:  dae476d1bd grep: extract grep_binexp() from grep_or_expr()
1:  71bd2d1bcc ! 2:  f637e02422 grep: use grep_and_expr() in compile_pattern_and()

@@ grep.c: static struct grep_expr *grep_or_expr(struct grep_expr *left, struct gre
static struct grep_expr *compile_pattern_or(struct grep_pat **); static struct grep_expr *compile_pattern_atom(struct grep_pat **list) {
+@@ grep.c: static struct grep_expr *compile_pattern_not(struct grep_pat **list)
+ static struct grep_expr *compile_pattern_and(struct grep_pat **list)
+ {
+ struct grep_pat *p;
+- struct grep_expr *x, *y, *z;
++ struct grep_expr *x, *y;
+
+ x = compile_pattern_not(list);
+ p = *list;
@@ grep.c: static struct grep_expr *compile_pattern_and(struct grep_pat **list)
y = compile_pattern_and(list);
if (!y)
--
2.34.1.455.gd6eb6fd089