From e16674957358dc2b2f5684812e89a6fb9b33670c Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 26 Feb 2009 22:34:08 +0300 Subject: [PATCH] Only implied states that aren't already true. I thought the code was already checking to make sure an implied state wasn't already the current state. Gar... Signed-off-by: Dan Carpenter --- smatch_slist.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/smatch_slist.c b/smatch_slist.c index c2c048ad..282800a3 100644 --- a/smatch_slist.c +++ b/smatch_slist.c @@ -533,6 +533,14 @@ static int is_currently_in_pool(struct sm_state *sm, struct state_list *pool, cur_state = get_sm_state_slist(cur_slist, sm->name, sm->owner, sm->sym); if (!cur_state) return 0; + + /* if it's the current state return false because then it's the state + itself, not the state in the pool. */ + /* fixme: The above confusing comment is a load of rubbish. + this doesn't belong here, it belongs somewhere else. */ + if (sm->state == cur_state->state) + return 0; + FOR_EACH_PTR(cur_state->pools, tmp) { if (tmp == pool) -- 2.11.4.GIT