expressions: just allocate zero_expr() fresh every time
commitb630de7d895ce24be2cfb6e8cc4e9f651f7156c0
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 Apr 2018 12:18:59 +0000 (17 15:18 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Tue, 17 Apr 2018 12:19:10 +0000 (17 15:19 +0300)
treef93ecdc51e441f862b73c64fce994632fc5669c3
parent5defc7f1a2259e4111cbcc95911616e252ce1a7e
expressions: just allocate zero_expr() fresh every time

The problem here is that I was thinking about how zero->parent works.  We
presumably reset it often so the ->parent pointer can point to nonsense.
It's probably not a big deal, because of how things are normally parsed but
just from a correctness point of view, it seems like the right thing.

The other thing is that I changed it to &int_ctype.  It shouldn't make any
difference but it feels more correct.  Probably the most correct thing
would be to force people to specify the type...

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