Re: [RFC PATCH 4/5] pack-objects: avoid reading uninitalized data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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). I am happy to add it, like:

  if (!*list_size) {
    progress_unlock();
    break;
  }

  entry = *list++;
  (*list_size)--;
  if (!entry->preferred_base)
    ...

if you like, but the current version seems to format it as one stanza
inside of the progress_lock/progress_unlock. Look at the version in
'master' to see what I mean.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux