On Fri, 13 Jun 2008 08:14:17 -0400
Jerry Van Baren <[EMAIL PROTECTED]> wrote:
> Looking at the source code, its pretty ugly already. Your change
> doesn't make it any more ugly and it could be argued that it is slightly
> less ugly (your patch removes the duplication of the "if( (...)"
> statement). I also don't see any alternative that would make the code
> beautiful. :-(
Actually, I think the following would be slightly cleaner:
#ifdef CONFIG_HAS_UID
# define HAS_UID (1)
#else
# define HAS_UID (0)
#endif
/* ... */
if (((strcmp (name, "serial#") == 0)
&& (!HAS_UID || (flag != 0xdeaf4add)))
|| ((strcmp (name, "ethaddr") == 0)
(I may have miscounted the parentheses though...I certainly see the
need for working syntax highlighting on this code ;-)
Haavard
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users