From 19a74058ef8427ae9c10c31968658006ba358808 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 8 Jul 2016 14:16:18 +0300 Subject: [PATCH] ranges, db: if we can't filter by comparison then use the whole range The problem here is that you have a return value like "0-255[==$0]" and say you have no information on what $0 is then we would return zero. This was later treated as an empty return and certain paths were incorrectly marked impossible. Signed-off-by: Dan Carpenter --- smatch_ranges.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smatch_ranges.c b/smatch_ranges.c index 4e30a804..9908bd16 100644 --- a/smatch_ranges.c +++ b/smatch_ranges.c @@ -291,10 +291,10 @@ static struct range_list *filter_by_comparison_call(char *c, struct expression * int comparison; if (!str_to_comparison_arg_helper(c, call, &comparison, &arg, endp)) - return NULL; + return start_rl; if (!get_implied_rl(arg, &right_orig)) - return NULL; + return start_rl; if (rl_type(start_rl) == &int_ctype && sval_is_negative(rl_min(start_rl)) && -- 2.11.4.GIT