From: Junio C Hamano Date: Thu, 14 Feb 2013 17:02:09 GMT Subject: Re: [PATCH v4 3/4] count-objects: report garbage files in pack directory too Message-ID: <7v8v6q3k32.fsf@alter.siamese.dyndns.org> In-Reply-To: Duy Nguyen writes: > On Wed, Feb 13, 2013 at 10:55 PM, Junio C Hamano wrote: >>> + default: >>> + return; >>> + } >>> + for (; first <= last; first++) >> >> This looks odd. If you use the usual last+1 convention between the >> caller and callee, you do not have to do this, or call this function >> with "i - 1" and "list->nr -1" as the last parameter. > > I know. I just don't know how to name the variable to say "the element > after the last one". In case it was unclear, by the "usual last+1 convention", I meant that it is perfectly normal to write for (i = first; i < last; i++) for (i = begin; i < end; i++) in C. Saying these as for (i = first; i < beyond_last; i++) for (i = begin; i < beyond_end; i++) look non-C.