check_precedence: fix a segfault
This test should have been OK, but apparently there is a way to try make
this parse an expression struct which wasn't been initialized all the way.
What happened here is that I had a VALUE expression with the ->op set to
'!'. In some ways, this fix is a hack, but in another way it is just
making the check more robust.
Here is the example program with triggered the bug.
enum {
OST_FALSE = 0,
OST_TRUE = (!OST_FALSE)
};
int test(void)
{
int x = 0;
if (OST_TRUE == x) {
}
}
Reported-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>