type_val: fix a type bug parsing global assignments
commit7cbe6f9055d5e2e52ab68a6898be366720f69daf
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Sep 2017 22:12:52 +0000 (14 01:12 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Sep 2017 22:12:52 +0000 (14 01:12 +0300)
treef64252125c4a3fe7fd1b9580ddb37019eef3395f
parent0f925dfbb70d64bcbbc7bdea000a00cc75f54cd4
type_val: fix a type bug parsing global assignments

If you had a global assignment like:

.u32_member = -1;

Then it storing that it was -1 instead of UINT_MAX.  When we try to get the
data back from the DB, the code says, "negatives are too low" so it sets it
to 0 because that's the lowest value a u32 can be.

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