[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r35297 - in trunk/subversion: include libsvn_subr libsvn_wc tests/cmdline tests/libsvn_subr

From: Greg Stein <gstein_at_gmail.com>
Date: Wed, 21 Jan 2009 14:53:28 +0100

On Sat, Jan 17, 2009 at 02:53, Paul T. Burba <pburba_at_collab.net> wrote:
>...
> +++ trunk/subversion/libsvn_subr/mergeinfo.c Fri Jan 16 17:53:26 2009 (r35297)
>...
> + /* Sort the rangelist, combine adjacent ranges into single ranges,
> + and make sure there are no overlapping ranges. */
> qsort(revlist->elts, revlist->nelts, revlist->elt_size,
> svn_sort_compare_ranges);
> + if (revlist->nelts > 1)
> + {

Strictly speaking, there is no need to call qsort() if nelts <= 1.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1041201
Received on 2009-01-21 14:53:43 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.