estate: estate_is_empty() should return false if the state is NULL
commit90584e898824224ac35c9fea97b7a0978d955741
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 20 Sep 2017 10:30:53 +0000 (20 13:30 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 20 Sep 2017 10:30:53 +0000 (20 13:30 +0300)
treeedab32d984349d026a98d67d1c337019e39ea796
parent2c0aa3b1ec771a0b9c66d32d50aecc214e172064
estate: estate_is_empty() should return false if the state is NULL

An empty is estate is a specific thing that means that the condition is
impossible.  It's for code like:  "foo = NULL;  if (foo) { ...".  On the
other hand if the estate is NULL that means the variable could be anything
those are two totally different things.

I just added a caller smatch_extra where we check if the estate is empty
when handling comparisons with zero and it broke because of this bug.
There are two other callers but they were only using it on non-NULL states.

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