[U-Boot] [PATCH v4 6/7] env: make "env default" selective, check and apply

Wolfgang Denk wd at denx.de
Sun Sep 2 13:58:45 CEST 2012


Dear Marek Vasut,

In message <201208242310.05189.marek.vasut at gmail.com> you wrote:
>
> > >> +	while (--argc>  0&&  **++argv == '-') {
> > > 
> > > mmmmm ... **++argv, yummy :) This might use some cleanup, to make more
> > > readable.
> > 
> > Uhm, this pattern is being used all over the place on that file (that's
> > where I copied it from).
> 
> That doesn't mean it's right, it just means the codebase is in a very sad state 
> :-C

Define "right".

And what makes you think the way K&R implemented such stuff would be
a "very sad state"? See for example the code from Unix Version 6:

"ls" command:

	if (--argc > 0 && *argv[1] == '-') {

or "grep":

	while (--argc > 0 && (++argv)[0][0]=='-')

etc. etc.

Any C beginner's class is supposed to be able to parse this...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Conceptual integrity in turn dictates that the  design  must  proceed
from  one  mind,  or  from  a  very small number of agreeing resonant
minds.               - Frederick Brooks Jr., "The Mythical Man Month"


More information about the U-Boot mailing list