From: Luiz Fernando N. Capitulino Date: Thu, 26 Apr 2007 21:12:14 GMT Subject: Re: [PATCH 1/5] Introduces for_each_revision() helper Message-ID: <20070426181214.36049e32@localhost> In-Reply-To: <46310485.8070605@shadowen.org> Em Thu, 26 Apr 2007 20:59:01 +0100 Andy Whitcroft escreveu: | If this is constructed like that then I would expect the code below to | be miss-compiled: | | if (condition) | for_each_revision(commit, rev) { | } | | As it would be effectivly be: | | if (condition) | prepare_revision_walk(rev); | while ((commit = get_revision(rev)) != NULL) { | } | | I think you'd want this to be something more like: | | #define for_each_revision(commit, rev) \ | for (prepare_revision_walk(rev); \ | (commit = get_revision(rev))) != NULL); ) { I'm *so* clueless that this mistake does not surprise me. Will fix, thanks for the review Andy. -- Luiz Fernando N. Capitulino