states: fix __set_sm() when a fake_cur_slist is being used
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Dec 2012 12:26:08 +0000 (14 15:26 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 14 Dec 2012 12:26:08 +0000 (14 15:26 +0300)
Currently we don't call __set_sm() with a fake cur slist that I know of,
but later I'm going to need to do that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_states.c

index 7a338ba..0acb370 100644 (file)
@@ -191,6 +191,9 @@ void __set_sm(struct sm_state *sm)
        if (unreachable())
                return;
 
+       if (fake_cur_slist_stack)
+               overwrite_sm_state_stack(&fake_cur_slist_stack, sm);
+
        overwrite_sm_state(&cur_slist, sm);
 
        if (cond_true_stack) {