extra: fix comparisons with zero (more)
commit6db451e092ebdab1548ec91e1373d0c9333d240b
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 21 Sep 2017 09:41:05 +0000 (21 12:41 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Thu, 21 Sep 2017 09:41:05 +0000 (21 12:41 +0300)
tree47a323ebab8f5402e5500695b8533b9d8d508459
parent0a9f4a9feeea9d919bf0e91c5d1678f1f1d5ffab
extra: fix comparisons with zero (more)

While I was fixing the bug that estate_is_empty() treats NULL states as
empty I became suspicious of this code and re-wrote it.  My worry is that
instead along side the smatch_extra state we should also be considering
information stored in the database for the true path.

In the current code, it assumes that because the estate is NULL then that
means we must take the whole range.  But instead we should look at the DB
and perhaps we can tell from the type that the range is limited.

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