| Re: svn commit: r1412554 - in /subversion/trunk/subversion: include/private/svn_string_private.h libsvn_subr/string.c tests/libsvn_subr/string-test.c
From: Julian Foad <julianfoad_at_btopenworld.com>
 Date: Thu, 22 Nov 2012 16:22:27 +0000 (GMT) 
> Author: brane
 > Date: Thu Nov 22 14:00:48 2012
 > Modified: subversion/trunk/subversion/libsvn_subr/string.c
 Unfortunately our C'89 coding standard doesn't allow us to use non-constant initializers, and there are some compilers occasionally used to build Subversion that don't accept it.
 > +  return svn_string__similarity(&stringa, &stringb, buffer, rlcs);
 Both "before" and "after" versions of this block appear to strip off (and count in LCS) not only the common suffix but also one non-matching character as well iff such a non-matching character remains in each string.  Is that the intention?  It looks wrong so please document it if so.
 >    if (stra < enda && strb < endb)
 It incremented it *one more than the true common-suffix count* is the relevant point.  (And then only if there was still at least one character remaining in each string at that time; but that's the condition of the outer "if" guarding this block, so necessarily true here.)
 >           so subtract 1 from the result. */
 - Julian
 | 
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.