kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* &array[0] vs array
@ 2017-03-30  0:30 Tobin C. Harding
  2017-03-30 13:04 ` Ruben Safir
  0 siblings, 1 reply; 4+ messages in thread
From: Tobin C. Harding @ 2017-03-30  0:30 UTC (permalink / raw)
  To: kernelnewbies

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.

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

end of thread, other threads:[~2017-04-03  1:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-30  0:30 &array[0] vs array Tobin C. Harding
2017-03-30 13:04 ` Ruben Safir
2017-03-30 16:05   ` Nicholas Mc Guire
2017-04-03  1:28     ` Tobin C. Harding

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).