From: Mike Frysinger Date: Mon, 22 Aug 2011 13:11:34 -0400 Subject: [U-Boot] [PATCH 1/3] net: Adds Fast Ethernet Controller driver for Armada100 In-Reply-To: <201108221845.06263.marek.vasut@gmail.com> References: <201108221242.34774.vapier@gentoo.org> <201108221845.06263.marek.vasut@gmail.com> Message-ID: <201108221311.35824.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Monday, August 22, 2011 12:45:06 Marek Vasut wrote: > On Monday, August 22, 2011 06:42:33 PM Mike Frysinger wrote: > > On Monday, August 22, 2011 12:07:26 Marek Vasut wrote: > > > On Monday, August 22, 2011 06:02:26 PM Mike Frysinger wrote: > > > > On Monday, August 22, 2011 01:11:57 Ajay Bhargav wrote: > > > > > + darmdfec = malloc(sizeof(struct armdfec_device)); > > > > > > > > sizeof(*darmdfec) > > > > > > Why are you against sizeof(struct ...) ? > > > > imo, it holds up against bit rot easier and the code is clearer > > OTOH, you don't have to look up what type of ptr it is if you use struct > ... i dont see how that's generally relevant. if you want to know what the type of a variable is, you look for its definition. i dont go looking for alloc related funcs on the off chance that someone explicitly wrote out the type. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://lists.denx.de/pipermail/u-boot/attachments/20110822/eeda6474/attachment.pgp