From: Mike Frysinger Date: Thu, 14 Jul 2011 13:58:50 -0400 Subject: [U-Boot] [PATCH 1/2] net/eth.c: make eth_get_dev_by_name(NULL) safe In-Reply-To: <4E1EB35F.1060400@hale.at> References: <4E118AD9.9000200@hale.at> <4E1EB35F.1060400@hale.at> Message-ID: <201107141358.52540.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 Thursday, July 14, 2011 05:14:07 Helmut Raiger wrote: > On 07/13/2011 01:46 PM, Detlev Zundel wrote: > >> The NDEBUG approach however, as Mike suggested, was what I was > >> looking for in the first place. > > Again, not so great. U-boot uses all kinds of assert(), BUG_ON(), > ASSERT() all over the place. > This probably needs a project wide effort, which is why I simply threw > in my NULL pointer check. we tend to look at the long term picture with the best/correct solution rather than one-offs which get thrown away in the end -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/20110714/b9de94e6/attachment.pgp