&array[0] vs array

Tobin C. Harding me at tobin.cc
Wed Mar 29 20:30:44 EDT 2017


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.



More information about the Kernelnewbies mailing list