Re: [RFC PATCH 4/5] pack-objects: avoid reading uninitalized data
- From
Nicolas Pitre <nico@cam.org>
- Date
- Oct 23, 2008, 16:47 UTC
- Message-ID
- <alpine.LFD.2.00.0810231246040.26244@xanadu.home>
- In-Reply-To
- <20081023153329.GC10804@coredump.intra.peff.net>
On Thu, 23 Oct 2008, Jeff King wrote:
Show 23 quoted lines
> On Wed, Oct 22, 2008 at 09:11:16PM -0400, Nicolas Pitre wrote:
>
> > > for (;;) {
> > > - struct object_entry *entry = *list++;
> > > + struct object_entry *entry;
> > > struct unpacked *n = array + idx;
> > > int j, max_depth, best_base = -1;
> > >
> > > @@ -1384,6 +1384,7 @@ static void find_deltas(struct object_entry **list, unsigned *list_size,
> > > progress_unlock();
> > > break;
> > > }
> >
> > ---> Please preserve the empty line here so the previous code
> > chunk still appears logically separate.
> >
> > > + entry = *list++;
> > > (*list_size)--;
> > > if (!entry->preferred_base) {
> > > (*processed)++;
>
> Er, there was no empty line there (or else there would have been a '-'
> line in the diff).Oh, right. I'm confused. Nevermind...
Nicolas