From 6404c1e1fc635e32d0a59aba6aa027c4ad69bc4f Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 15 Mar 2019 11:41:40 +0300 Subject: [PATCH] mtag: fix handling of arrays The problem here is that say we have "foo->bar[]", that's an array but it's not an EXPR_SYMBOL like the code assumes. We end up generating a wrong pointer as a string. This code is just wrong, and can be deleted. Signed-off-by: Dan Carpenter --- smatch_mtag.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/smatch_mtag.c b/smatch_mtag.c index dd9f7287..36d8f692 100644 --- a/smatch_mtag.c +++ b/smatch_mtag.c @@ -468,9 +468,6 @@ int get_mtag_sval(struct expression *expr, sval_t *sval) if (expr->type == EXPR_STRING && get_string_mtag(expr, &tag)) goto found; - if (type->type == SYM_ARRAY && get_toplevel_mtag(expr->symbol, &tag)) - goto found; - if (get_implied_mtag_offset(expr, &tag, &offset)) goto found; -- 2.11.4.GIT