sval: don't overflow in increment/decrement_state
commit8263f59dd3385c28c3b98d29dec0f16735d3e209
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 12 Nov 2012 14:48:44 +0000 (12 17:48 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 12 Nov 2012 14:48:44 +0000 (12 17:48 +0300)
tree5e2b0f33ce61c7ecd7f4321b9fc3f07753358776
parent79964853bb83463c33aef537796e45d4ae4c2db3
sval: don't overflow in increment/decrement_state

Perhaps we should allow overflowing...  I'm not sure.  But this isn't
the right way to do it anyway...

The situation here was:
u16 x = -1;
if (y)
x++;

The other thing is that if it's min or max that probably is not a hard min
or max.  So just leave it as min or max.

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