From: Alexey Dobriyan <adobriyan@gmail.com>
To: kieran.bingham@ideasonboard.com
Cc: rasmus.villemoes@prevas.dk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] kernel.h: provide array iterator
Date: Fri, 16 Mar 2018 22:40:32 +0300 [thread overview]
Message-ID: <20180316194032.GA7589@avx2> (raw)
Proper form for iteration over an array is below:
int a[] = {1, 2, 3, 5};
for (int x: a) {
...
}
Your macro forces an iterator to be pointer which is uh-oh.
next reply other threads:[~2018-03-16 20:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 19:40 Alexey Dobriyan [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-03-15 10:00 [PATCH][RFC] kernel.h: provide array iterator Kieran Bingham
2018-03-16 4:21 ` Kees Cook
2018-03-16 6:41 ` Julia Lawall
2018-03-16 7:31 ` Kieran Bingham
2018-03-16 15:27 ` Rasmus Villemoes
2018-03-16 18:45 ` Joe Perches
2018-03-17 10:12 ` Kieran Bingham
2018-03-17 9:32 ` Kieran Bingham
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=20180316194032.GA7589@avx2 \
--to=adobriyan@gmail.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rasmus.villemoes@prevas.dk \
/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