From b370c7ba5bdeb6da2af850eeb327762284c64d4c Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 26 Nov 2012 11:19:23 +0300 Subject: [PATCH] math: overflow implies that there is no fuzzy max If you do a binop that overflows, by definition that means that there isn't a fuzzy max for it. Signed-off-by: Dan Carpenter --- smatch_math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smatch_math.c b/smatch_math.c index 6e57a3da..fe76e965 100644 --- a/smatch_math.c +++ b/smatch_math.c @@ -283,12 +283,12 @@ static sval_t handle_binop(struct expression *expr, int *undefined, int implied) switch (implied) { case IMPLIED_MAX: - case FUZZY_MAX: case ABSOLUTE_MAX: if (sval_binop_overflows(left, expr->op, right)) return sval_type_max(get_type(expr)); break; case HARD_MAX: + case FUZZY_MAX: if (sval_binop_overflows(left, expr->op, right)) { *undefined = 1; return bogus; -- 2.11.4.GIT