var_sym: fix handling of arrays
commitdb166f58350d14b14fb71af0c60f28ebfe7178cf
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 18 Oct 2017 09:58:00 +0000 (18 12:58 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Wed, 18 Oct 2017 09:58:00 +0000 (18 12:58 +0300)
treed3a8a214a63fab7249ae658769d09a39deb80ee3
parentaac49d187803e70c31323720063351b5c33f18ab
var_sym: fix handling of arrays

The breakage was detected with the validation test suite.

I wrote this thinking that we could take a short cut if there was just one
sym involved.  But in an array like "array[2]" there is only one sym but
it's not a variable so we can't take the short cut.

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