ranges: use signed type for negative ints less than an unsigned parameter
commitdfe27cf918e52fa00c1c6ec10b0f72ee45316236
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Apr 2016 12:02:05 +0000 (25 15:02 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 25 Apr 2016 12:02:05 +0000 (25 15:02 +0300)
treecf562b83bb25126efbbdb6ca4ee92536f5149269
parente5fe22a7e2e94889688ed79a8807fbc1685b042f
ranges: use signed type for negative ints less than an unsigned parameter

Say you can't divide the returns up into success and fail.  So you have
some negative values mixed with positive values less than size_t size.
We could either lose the comparison or just use signed values.  Using
signed values is a bit of a hack but I feel like it's the right thing.

In the old code, the negative values just silently disappeared without a
trace.

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