From d23368f4b277ab67afe85bebd34054136af12d1b Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 6 Jun 2018 17:03:53 +0300 Subject: [PATCH] extra: remove an unneeded __set_sm() in db_param_limit_filter The FIXME asks if this call is necessary and I think it is not. Signed-off-by: Dan Carpenter --- smatch_extra.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/smatch_extra.c b/smatch_extra.c index 3dc3b2eb..ba47057d 100644 --- a/smatch_extra.c +++ b/smatch_extra.c @@ -2322,6 +2322,8 @@ static void db_param_limit_filter(struct expression *expr, int param, char *key, struct range_list *rl; struct range_list *limit; struct range_list *new; + char *tmp_name; + struct symbol *tmp_sym; while (expr->type == EXPR_ASSIGNMENT) expr = strip_expr(expr->right); @@ -2360,24 +2362,18 @@ static void db_param_limit_filter(struct expression *expr, int param, char *key, /* We want to preserve the implications here */ if (sm && basically_the_same(estate_rl(sm->state), new)) - __set_sm(sm); /* FIXME: Is this really necessary? */ - else { - char *tmp_name; - struct symbol *tmp_sym; - - tmp_name = map_long_to_short_name_sym(name, sym, &tmp_sym); - if (tmp_name && tmp_sym) { - free_string(name); - name = tmp_name; - sym = tmp_sym; - } - - if (op == PARAM_LIMIT) - set_extra_nomod_vsl(name, sym, vsl, NULL, alloc_estate_rl(new)); - else - set_extra_mod(name, sym, NULL, alloc_estate_rl(new)); + goto free; + tmp_name = map_long_to_short_name_sym(name, sym, &tmp_sym); + if (tmp_name && tmp_sym) { + free_string(name); + name = tmp_name; + sym = tmp_sym; } + if (op == PARAM_LIMIT) + set_extra_nomod_vsl(name, sym, vsl, NULL, alloc_estate_rl(new)); + else + set_extra_mod(name, sym, NULL, alloc_estate_rl(new)); free: free_string(name); } -- 2.11.4.GIT