extra: clear hard max if we are falling back to the type max on loops
commit9152d6aac439aebe6cc63b7ac87a2f2016f74ad5
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 23 Nov 2012 11:25:36 +0000 (23 14:25 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Fri, 23 Nov 2012 11:25:36 +0000 (23 14:25 +0300)
tree7c5d661b130560aa7397dcd7e8697f6a5a6614d1
parent159b0ac23ba1f96cd30b120124d41528a562a5cc
extra: clear hard max if we are falling back to the type max on loops

The problem here is like this:
if (i = 0; i < some_var; i++) {
...
}

If we don't know the value of some_var then the inside the loop the value
is type_max - 1.  The false path is type_max.

The problem is that type_max is just a single value, and we single values
are automatically a hard max.  Which normally works, but in this case we
need to clear the hard max setting.

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