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

Re: Input validation observations

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Fri, 10 Dec 2010 08:40:42 -0500

On 12/10/2010 07:00 AM, Julian Foad wrote:
> Noorul Islam K M wrote:
>> Attached is the patch for svn/diff-cmd.c. All tests pass.
>
> Hi Noorul. Thanks for mentioning that all tests pass - that's good to
> know.
>
>> + svn_cl__assert_homogeneous_target_type(targets);
>> +
>> /* Check to see if at least one of our paths is a working copy
>> path. */
>> for (i = 0; i < targets->nelts; ++i)
>
> After you have asserted that all the targets are of the same type, there
> is no need for a loop that checks all of them in turn, just to find out
> whether they are paths or URLs, is there?

Maybe svn_cl__assert_homogeneous_target_type() should optionally set an
is_url boolean return value so all callers can benefit?

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
Received on 2010-12-10 14:41:24 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.