From: Mauro Dreissig <mukadr@gmail.com>
To: linux-sparse@vger.kernel.org
Subject: [PATCH] Fix wrong array size expression
Date: Wed, 01 Aug 2012 13:07:35 -0300 [thread overview]
Message-ID: <50195447.2060407@gmail.com> (raw)
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
next reply other threads:[~2012-08-01 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 16:07 Mauro Dreissig [this message]
2012-08-01 16:35 ` [PATCH] Fix wrong array size expression Christopher Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50195447.2060407@gmail.com \
--to=mukadr@gmail.com \
--cc=linux-sparse@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).