| 751 | } |
| 752 | |
| 753 | static struct grep_expr *grep_splice_or(struct grep_expr *x, struct grep_expr *y) |
| 754 | { |
| 755 | struct grep_expr *z = x; |
| 756 | |
| 757 | while (x) { |
| 758 | assert(x->node == GREP_NODE_OR); |
| 759 | if (x->u.binary.right && |
| 760 | x->u.binary.right->node == GREP_NODE_TRUE) { |
| 761 | free(x->u.binary.right); |
| 762 | x->u.binary.right = y; |
| 763 | break; |
| 764 | } |
| 765 | x = x->u.binary.right; |
| 766 | } |
| 767 | return z; |
| 768 | } |
| 769 | |
| 770 | void compile_grep_patterns(struct grep_opt *opt) |
| 771 | { |
no outgoing calls
no test coverage detected