linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix wrong array size expression
@ 2012-08-01 16:07 Mauro Dreissig
  2012-08-01 16:35 ` Christopher Li
  0 siblings, 1 reply; 2+ messages in thread
From: Mauro Dreissig @ 2012-08-01 16:07 UTC (permalink / raw)
  To: linux-sparse

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
---
 expression.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/expression.c b/expression.c
index 0ae3a60..9f45c79 100644
--- a/expression.c
+++ b/expression.c
@@ -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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-01 16:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-01 16:07 [PATCH] Fix wrong array size expression Mauro Dreissig
2012-08-01 16:35 ` Christopher Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).