From: Wolfgang Denk Date: Sun, 02 Sep 2012 13:58:45 +0200 Subject: [U-Boot] [PATCH v4 6/7] env: make "env default" selective, check and apply In-Reply-To: <201208242310.05189.marek.vasut@gmail.com> References: <1321634955-5561-1-git-send-email-gerlando.falauto@keymile.com> <201208241656.45012.marex@denx.de> <50379956.2090004@keymile.com> <201208242310.05189.marek.vasut@gmail.com> Message-ID: <20120902115845.AC996203B2F@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Marek Vasut, In message <201208242310.05189.marek.vasut@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"