core: fix problem in handling select statement / ORing state lists
commitac6332cf8d0ebd9d2377e4786152ab3a23816e76
authorDan Carpenter <error27@gmail.com>
Thu, 1 Apr 2010 10:52:35 +0000 (1 13:52 +0300)
committerDan Carpenter <error27@gmail.com>
Thu, 1 Apr 2010 10:52:35 +0000 (1 13:52 +0300)
tree19bddbddeca26f8f5138fd68a5963427e5af52a7
parent63a6459fc2f21de184989381f9198da382087a36
core: fix problem in handling select statement / ORing state lists

This introduces filter_slist() which I will probably want later on.

This problem showed up in a select statement.  I don't know if it affects
anything else.

The cond_true and cond_false lists are only supposed to include the
states which have been set.  But when we OR the cond_true and cond_false
states we have to take the pre conditions into account.  Otherwise if a
state has been set in cond false and in the pre cond list but not in the
cond true list we get a merge with "undefined".

The problem is that when we get done, we don't want those pre condition
states to still be around.  So we filter them out.

Signed-off-by: Dan Carpenter <error27@gmail.com>
smatch_slist.c
smatch_slist.h
validation/sm_select4.c [new file with mode: 0644]