From 683d58233b8d4a4092b2f6e692ff6b54d032664f Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 4 Feb 2013 11:00:34 +0300 Subject: [PATCH] math: get_implied_max() should be able to return s32max When I changed get_implied_min() I said that get_implied_max() could return s32max but it turns out that it couldn't. It should do. The reason we want this to work is because there are times when we know either the upper bound or the lower bound. With the old code we ended up discarding both sides when we tried to use the information for math. Signed-off-by: Dan Carpenter --- smatch_math.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/smatch_math.c b/smatch_math.c index d4765a42..09181842 100644 --- a/smatch_math.c +++ b/smatch_math.c @@ -534,8 +534,6 @@ static int get_implied_value_helper(struct expression *expr, sval_t *sval, int i } if (implied == IMPLIED_MAX || implied == ABSOLUTE_MAX) { *sval = estate_max(state); - if (sval_is_max(*sval)) /* this means just guessing. fixme. not really */ - return 0; return 1; } *sval = estate_min(state); -- 2.11.4.GIT