db: fix how the return values are casted
commit1af54cdd5a74cfb06928013c4ec1f8acda947f8f
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 8 Apr 2013 06:31:42 +0000 (8 09:31 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 8 Apr 2013 06:31:42 +0000 (8 09:31 +0300)
tree1b94cc8af868ab4a7e472949b377341cb94227d8
parent7ac69f2147f15e110780fc7ecc5ebef888e217ed
db: fix how the return values are casted

Say you have:

int foo(void)
{
unsigned char val;
...
return val;
}

We don't know the value of "val".  So the right thing to do is take the
whole range of val (0-255) and cast it to int and that's the return ranges.

Before we just took the whole range of int.

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