mbox series

[v2,0/2] grep: introduce and use grep_and_expr()

Message ID cover.1641508884.git.me@ttaylorr.com (mailing list archive)
Headers show
Series grep: introduce and use grep_and_expr() | expand

Message

Taylor Blau Jan. 6, 2022, 10:42 p.m. UTC
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