bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] [PATCH 19/25] Bugfix: Prevent sorting of unallocated meta


From: Matthew White
Subject: Re: [Bug-wget] [PATCH 19/25] Bugfix: Prevent sorting of unallocated metalink resource/metaurl
Date: Tue, 13 Sep 2016 07:05:05 +0200

On Sun, 11 Sep 2016 23:27:10 +0200
Giuseppe Scrivano <address@hidden> wrote:

> Matthew White <address@hidden> writes:
> 
> > diff --git a/src/main.c b/src/main.c
> > index ac6ee2c..11ea86d 100644
> > --- a/src/main.c
> > +++ b/src/main.c
> > @@ -2136,10 +2136,11 @@ only if outputting to a regular file.\n"));
> >                    for (mres_ptr = mfile->resources; *mres_ptr; mres_ptr++)
> >                      mres_count++;
> >  
> > -                  stable_sort (mfile->resources,
> > -                               mres_count,
> > -                               sizeof (metalink_resource_t *),
> > -                               metalink_res_cmp);
> > +                  if (mres_count > 1)
> > +                    stable_sort (mfile->resources,
> > +                                 mres_count,
> > +                                 sizeof (metalink_resource_t *),
> > +                                 metalink_res_cmp);
> >                  }
> >              }
> >            retr_err = retrieve_from_metalink (metalink);
> 
> hm.. actually stable_sort checks for size, but I think it should check
> for nmemb.  Could you please fix stable_sort (utils.c) to do the right
> thing and replace this patch with that?

Thanks Giuseppe.

Replaced (here and in Patch 20/25) with a src/utils.c (stable_sort) nmemb > 1 
test condition.

Posting after final decisions are taken about open topics in this series of 
patches.

> 
> Regards,
> Giuseppe

Regards,
Matthew

-- 
Matthew White <address@hidden>

Attachment: pgpUfM1j4jPh2.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]