On Sun, 11 Sep 2016 23:27:10 +0200 Giuseppe Scrivano <[email protected]> wrote:
> Matthew White <[email protected]> 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 <[email protected]>
pgpuMoS1GOw5C.pgp
Description: PGP signature
