param_filter: total re-write with bugfixes
commitfc7e5a7277f00b0b7e96fc7ad8ee5c6fcc766757
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 9 Jan 2015 10:19:04 +0000 (9 13:19 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 9 Jan 2015 10:19:04 +0000 (9 13:19 +0300)
treeedc6ae216744f7e673f5abac2e1a518d9a1f741d
parentedc9be6bc00b6652aee1cc3798be1eac38331eb8
param_filter: total re-write with bugfixes

I had re-written smatch_param_limit.c recently and wanted to re-write this
as well.

The problem is this wasn't parsing the following code correctly:

        if (win->clipcount && !win->clips)
                win->clipcount = 0;
        if (win->clipcount > MAX_CLIPS)
                win->clipcount = MAX_CLIPS;

At the first merge it says zero was set but the original filtered could be
any value, therefore there is no filter.

In the new code it says, "zero was set" the original filtered could be any
thing.  But then it says "MAX_CLIPS" was set, the original value is
anything intersection with 0-16 so the original filtered is 0-16.  This
uses the new pre_merge_hook()s that I introduced earlier.

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