Author: rhuijben
Date: Wed Jan 18 12:45:29 2012
New Revision: 1232864
URL: http://svn.apache.org/viewvc?rev=1232864&view=rev
Log:
* subversion/libsvn_client/cmdline.c
(svn_client_args_to_target_array2): Reduce scope of variable to make flow
easier to review.
Modified:
subversion/trunk/subversion/libsvn_client/cmdline.c
Modified: subversion/trunk/subversion/libsvn_client/cmdline.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/cmdline.c?rev=1232864&r1=1232863&r2=1232864&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/cmdline.c (original)
+++ subversion/trunk/subversion/libsvn_client/cmdline.c Wed Jan 18 12:45:29 2012
@@ -168,7 +168,6 @@ svn_client_args_to_target_array2(apr_arr
int i;
svn_boolean_t rel_url_found = FALSE;
const char *root_url = NULL;
- svn_error_t *err = SVN_NO_ERROR;
apr_array_header_t *input_targets =
apr_array_make(pool, DEFAULT_ARRAY_SIZE, sizeof(const char *));
apr_array_header_t *output_targets =
@@ -348,6 +347,7 @@ svn_client_args_to_target_array2(apr_arr
if (root_url == NULL)
{
const char *current_abspath;
+ svn_error_t *err;
SVN_ERR(svn_dirent_get_absolute(¤t_abspath, "", pool));
err = svn_client_get_repos_root(&root_url, NULL /* uuid */,
@@ -391,11 +391,17 @@ svn_client_args_to_target_array2(apr_arr
else
*targets_p = output_targets;
- if (reserved_names && ! err)
- for (i = 0; i < reserved_names->nelts; ++i)
- err = svn_error_createf(SVN_ERR_RESERVED_FILENAME_SPECIFIED, err,
- _("'%s' ends in a reserved name"),
- APR_ARRAY_IDX(reserved_names, i, const char *));
+ if (reserved_names)
+ {
+ svn_error_t *err = SVN_NO_ERROR;
+
+ for (i = 0; i < reserved_names->nelts; ++i)
+ err = svn_error_createf(SVN_ERR_RESERVED_FILENAME_SPECIFIED, err,
+ _("'%s' ends in a reserved name"),
+ APR_ARRAY_IDX(reserved_names, i,
+ const char *));
+ return svn_error_trace(err);
+ }
- return svn_error_trace(err);
+ return SVN_NO_ERROR;
}