Thread (4 messages) 4 messages, 3 authors, 2017-04-03

&array[0] vs array

From: Ruben Safir <hidden>
Date: 2017-03-30 13:04:35

On 03/29/2017 08:30 PM, Tobin C. Harding wrote:
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.
maybe there is a another reason why 2 is not used.

-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com

Being so tracked is for FARM ANIMALS and and extermination camps,
but incompatible with living as a free human being. -RI Safir 2013
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help