From: Detlev Zundel Date: Wed, 13 Jul 2011 13:34:11 +0200 Subject: [U-Boot] [PATCH 1/2] net/eth.c: make eth_get_dev_by_name(NULL) safe In-Reply-To: (Mike Frysinger's message of "Tue, 12 Jul 2011 16:49:43 -0400") References: <4E118AD9.9000200@hale.at> <4E1AC82D.3020205@hale.at> <201107120237.33837.vapier@gentoo.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Mike, [...] > not really. i consider this to be "garbage-in garbage-out". imo, > u-boot isnt a C library that should be padded with garbage checking > all over. the result only helps broken systems (edge cases) while > hindering the rest. > > i wouldnt have a problem with adopting an NDEBUG system, or perhaps > adding assert()'s to this code. then people can easily opt-out of it > all and for the people doing development, can easily turn things on. > assert(name != NULL); While developing, I certainly appreciate 'garbage-in error-out' and as your approach allows this, I believe we have reached a consensus. > the current miiphy system needs to be replaced (this runtime string > based approach is crazy), but that's a completely different topic :). I'm looking forward to your changes :) Thanks! Detlev -- By all means let's be open-minded, but not so open-minded that our brains drop out. -- Richard Dawkins -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de