Fix wrong array size expression
PATCH 1/1 Fix wrong array size expression
Signed-off-by Mauro Dreissig <[email protected]>
--- expression.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
expression.c +1 -1
@@ -655,7 +655,7 @@ static struct token *unary_expression(struct token *token, struct expression **t { &__sizeof_ptr___ident, EXPR_PTRSIZEOF }, };int i; -for (i =0 ; i <3 ; i++) { +for (i =0 ; i <ARRAY_SIZE (type_information); i++) {if (ident == type_information[i].id)return type_info_expression (token, tree, type_information[i].type); }
Signature · 1 line
1.7.11.2
Christopher Li
maintainerThanks for the good catch. That is simple and obvious correct.
Will apply.
Chris
Quoted 25 lines · Mauro Dreissig
Signed-off-by Mauro Dreissig <[email protected]>--- expression.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)expression.c +1
-2@@ -655,7 +655,7 @@ static struct token *unary_expression(struct token *token, struct expression **t { &__sizeof_ptr___ident, EXPR_PTRSIZEOF }, };int i; -for (i =0 ; i <3 ; i++) { +for (i =0 ; i <ARRAY_SIZE (type_information); i++) {if (ident == type_information[i].id)return type_info_expression (token, tree, type_information[i].type); } --1.7.11.2
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html