From dec2de454634fa9a7d190c4e5c3777857b581692 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 4 Nov 2014 11:05:36 +0300 Subject: [PATCH] db: do the comparison against the split apart returns I don't know if this makes a difference, but it feels like the correct thing. We should be doing the comparison against the split apart hook instead of the merged return so it's more precise. Signed-off-by: Dan Carpenter --- smatch_db.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smatch_db.c b/smatch_db.c index b5f449b2..43ba5601 100644 --- a/smatch_db.c +++ b/smatch_db.c @@ -961,7 +961,6 @@ static int call_return_state_hooks_split_possible(struct expression *expr) if (option_info && nr_states * nr_possible >= 2000) return 0; - compare_str = expr_lte_to_param(expr, -1); FOR_EACH_PTR(sm->possible, tmp) { if (tmp->merged) @@ -974,6 +973,8 @@ static int call_return_state_hooks_split_possible(struct expression *expr) rl = cast_rl(cur_func_return_type(), estate_rl(tmp->state)); return_ranges = show_rl(rl); + + compare_str = expr_lte_to_param(expr, -1); if (compare_str) { snprintf(buf, sizeof(buf), "%s%s", return_ranges, compare_str); return_ranges = alloc_sname(buf); -- 2.11.4.GIT