From 5bda2cbf11d99da739d82733c32fcb28c32d230c Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 18 Feb 2009 22:58:44 +0300 Subject: [PATCH] Remove call to alloc_state() alloc_state() deletes the ->possible list. Plus it's just another unneeded allocation. Signed-off-by: Dan Carpenter --- smatch_slist.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/smatch_slist.c b/smatch_slist.c index 42317992..a8e4c516 100644 --- a/smatch_slist.c +++ b/smatch_slist.c @@ -436,7 +436,6 @@ void merge_slist(struct state_list **to, struct state_list *slist) { struct sm_state *to_state, *state, *tmp; struct state_list *results = NULL; - struct smatch_state *s; struct state_list *implied_to = NULL; struct state_list *implied_from = NULL; @@ -471,12 +470,7 @@ void merge_slist(struct state_list **to, struct state_list *slist) NEXT_PTR_LIST(to_state); } else if (cmp_tracker(to_state, state) == 0) { if (to_state->state == state->state) { - s = to_state->state; - tmp = alloc_state(to_state->name, - to_state->owner, - to_state->sym, s); - copy_pools(tmp, to_state); - copy_pools(tmp, state); + tmp = to_state; } else { tmp = merge_sm_states(to_state, state); -- 2.11.4.GIT