From 2f2767661234c047355164808281520a9376e104 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 17 Feb 2015 14:25:13 +0300 Subject: [PATCH] function_hooks: don't take a shortcut for "needless" states The logic here was that if we don't have a state then we don't need to set the state to unknown, since the default state is already unknown. This was supposed to save memory. But these days there are a lot of places which tie into modification hooks to tell when a variable is initialized so this information is still useful. Signed-off-by: Dan Carpenter --- smatch_function_hooks.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/smatch_function_hooks.c b/smatch_function_hooks.c index c8351872..16bd1065 100644 --- a/smatch_function_hooks.c +++ b/smatch_function_hooks.c @@ -720,8 +720,6 @@ static void match_assign_call(struct expression *expr) return; } if (is_fake_call(right)) { - if (!get_state_expr(SMATCH_EXTRA, expr->left)) - return; set_extra_expr_mod(expr->left, alloc_estate_whole(get_type(expr->left))); return; } -- 2.11.4.GIT