From 3de273d4875e69f02801b5e6affd3824c19e9bf6 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Sat, 14 Feb 2009 21:11:41 +0300 Subject: [PATCH] Use strip_expr() in split_conditions() instead reproducing it badly. The other thing this means is that match_condition hooks don't need to call split_expr() right away. Signed-off-by: Dan Carpenter --- smatch_conditions.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/smatch_conditions.c b/smatch_conditions.c index a2e716eb..4472b27f 100644 --- a/smatch_conditions.c +++ b/smatch_conditions.c @@ -109,10 +109,6 @@ static int handle_preop(struct expression *expr) __negate_cond_stacks(); return 1; } - if (expr->op == '(') { - split_conditions(expr->unop); - return 1; - } return 0; } @@ -160,7 +156,9 @@ static void split_conditions(struct expression *expr) { SM_DEBUG("%d in split_conditions type=%d\n", get_lineno(), expr->type); - + + expr = strip_expr(expr); + switch(expr->type) { case EXPR_LOGICAL: handle_logical(expr); -- 2.11.4.GIT