kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: me@tobin.cc (Tobin C. Harding)
To: kernelnewbies@lists.kernelnewbies.org
Subject: &array[0] vs array
Date: Thu, 30 Mar 2017 11:30:44 +1100	[thread overview]
Message-ID: <20170330003044.GI25014@eros> (raw)

Does the kernel community have a preference when using the address of
the first element of an an array?

1. addr = &array[0]
2. addr = array;

$ grep '\&.*\[0\]' | wc -l
10077

style (1) is clearly used, I was not able to grep for instances where
style (2) is used.

thanks,
Tobin.

             reply	other threads:[~2017-03-30  0:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  0:30 Tobin C. Harding [this message]
2017-03-30 13:04 ` &array[0] vs array Ruben Safir
2017-03-30 16:05   ` Nicholas Mc Guire
2017-04-03  1:28     ` Tobin C. Harding

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=20170330003044.GI25014@eros \
    --to=me@tobin.cc \
    --cc=kernelnewbies@lists.kernelnewbies.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).