sizeof(*dev) : arch/arm/common/sa1111.c
A message that is not in the archive (sent off-list or not yet received): 20050630215819.226570000@
Quoted 3 lines · On Thu, Jun 30, 2005 at 11:58:19PM +0200, [email protected] wrote:
when using sizeof consider using the variable and not the type, that way if the type of the variable is changed we don't have to go seaching all instances of sizeof(type).
This is a matter of taste, and I decided upon sizeof(type) after a discussion with Al Viro on this subject.
I believe the overwealming argument for sizeof(type) as opposed to sizeof(expression) is that you can identify easily where likely initialisations happen, and therefore places which need to be properly updated if/when you change the type.
I'm also sending this to Al so he can give his point of view on sizeof(type) vs sizeof(expression).
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core