subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1460802 - /subversion/trunk/subversion/libsvn_subr/mergeinfo.c
Date Mon, 25 Mar 2013 18:13:02 GMT
Author: julianfoad
Date: Mon Mar 25 18:13:02 2013
New Revision: 1460802

URL: http://svn.apache.org/r1460802
Log:
* subversion/libsvn_subr/mergeinfo.c
  (svn_rangelist__combine_adjacent_ranges): Use an existing function to
    delete an element from an array. A follow-up to the recent r1460763
    which fixed a bug in the manual code, which demonstrates why it's
    safer to call a function.

Modified:
    subversion/trunk/subversion/libsvn_subr/mergeinfo.c

Modified: subversion/trunk/subversion/libsvn_subr/mergeinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/mergeinfo.c?rev=1460802&r1=1460801&r2=1460802&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/mergeinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/mergeinfo.c Mon Mar 25 18:13:02 2013
@@ -649,11 +649,7 @@ svn_rangelist__combine_adjacent_ranges(s
           if (lastrange->inheritable == range->inheritable)
             {
               lastrange->end = MAX(range->end, lastrange->end);
-              if (i + 1 < rangelist->nelts)
-                memmove(rangelist->elts + (rangelist->elt_size * i),
-                        rangelist->elts + (rangelist->elt_size * (i + 1)),
-                        rangelist->elt_size * (rangelist->nelts - i - 1));
-              rangelist->nelts--;
+              svn_sort__array_delete(rangelist, i, 1);
               i--;
             }
         }



Mime
View raw message