* Re: [patch 1/1] sizeof(*dev) : arch/arm/common/sa1111.c
[not found] <20050630215819.226570000@>
@ 2005-07-01 10:04 ` Russell King
0 siblings, 0 replies; only message in thread
From: Russell King @ 2005-07-01 10:04 UTC (permalink / raw)
To: domen, Al Viro; +Cc: linux-kernel, Christophe Lucas
On Thu, Jun 30, 2005 at 11:58:19PM +0200, domen@coderock.org 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).
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-01 10:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20050630215819.226570000@>
2005-07-01 10:04 ` [patch 1/1] sizeof(*dev) : arch/arm/common/sa1111.c Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®