ranges: don't allow inverted ranges
commit09e801f40034421a651c5a7d3837b75b2a22a31d
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 6 Feb 2013 08:19:23 +0000 (6 11:19 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 6 Feb 2013 08:19:23 +0000 (6 11:19 +0300)
treeffa7684d8f4992aa3d47c833fcb0b239567db982
parentc788d9ef7dbcdcb12112b2487b2ac7279ffeaea9
ranges: don't allow inverted ranges

When the min is more than max that's bogus information, don't save it.

Part of the problem why we even have to deal with this is that
smatch_math.c is buggy and incomplete.

I changed alloc_whole_range() as well to handle void types.  Those have
a size of -2 and cause the min to be greater than the max.  It causes an
endless loop.

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