From b611e64319407e530fc4aa4155d54133da73b793 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 17 Apr 2013 11:34:56 +0300 Subject: [PATCH] ranges: an empty range is not a whole range In the original code the reason I treated an empty range like a whole range was because I thought it was an impossible condition so it meant the value could be anything. But it turns out there are valid reasons to have an empty range. For example, in param_filter an empty range means none of the original values are preserved. Signed-off-by: Dan Carpenter --- smatch_ranges.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smatch_ranges.c b/smatch_ranges.c index d2a70240..ecf08fab 100644 --- a/smatch_ranges.c +++ b/smatch_ranges.c @@ -140,7 +140,7 @@ int is_whole_rl(struct range_list *rl) struct data_range *drange; if (ptr_list_empty(rl)) - return 1; + return 0; drange = first_ptr_list((struct ptr_list *)rl); if (sval_is_min(drange->min) && sval_is_max(drange->max)) return 1; -- 2.11.4.GIT