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

Re: svn commit: r36944 - trunk/subversion/libsvn_client

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 2 Apr 2009 20:56:14 +0200

On Thu, Apr 2, 2009 at 17:58, Senthil Kumaran S <senthil_at_collab.net> wrote:
>...
> +++ trunk/subversion/libsvn_client/add.c        Thu Apr  2 08:58:22 2009        (r36944)
> @@ -659,6 +659,18 @@ mkdir_urls(svn_commit_info_t **commit_in
>   const char *common;
>   int i;
>
> +  /* Early exit when there is a mix of URLs and local paths. */
> +  for (i = 0; i < urls->nelts; i++)
> +    {
> +      const char *url = APR_ARRAY_IDX(urls, i, const char *);
> +      if (svn_path_is_url(url))
> +        continue;
> +      else
> +        return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
> +                                 _("Illegal repository URL '%s'"),
> +                                 url);
> +    }

Why the complicated if/else? Why not just:

  if (!url)
    return svn_error

Seems a lot cleaner.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1522875
Received on 2009-04-02 20:57:35 CEST

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.