subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1721668 - /subversion/trunk/subversion/libsvn_client/revisions.c
Date Fri, 25 Dec 2015 10:47:55 GMT
Author: ivan
Date: Fri Dec 25 10:47:55 2015
New Revision: 1721668

URL: http://svn.apache.org/viewvc?rev=1721668&view=rev
Log:
Refactor code a bit to make easier for reading.

* subversion/libsvn_client/revisions.c
  (svn_client__get_revision_number): Duplicate svn_error_create() call instead
   of using goto statement.

Modified:
    subversion/trunk/subversion/libsvn_client/revisions.c

Modified: subversion/trunk/subversion/libsvn_client/revisions.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/revisions.c?rev=1721668&r1=1721667&r2=1721668&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/revisions.c (original)
+++ subversion/trunk/subversion/libsvn_client/revisions.c Fri Dec 25 10:47:55 2015
@@ -89,7 +89,9 @@ svn_client__get_revision_number(svn_revn
         /* The BASE, COMMITTED, and PREV revision keywords do not
            apply to URLs. */
         if (svn_path_is_url(local_abspath))
-          goto invalid_rev_arg;
+          return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL,
+                                  _("PREV, BASE, or COMMITTED revision "
+                                    "keywords are invalid for URL"));
 
         err = svn_wc__node_get_origin(NULL, revnum, NULL, NULL, NULL, NULL,
                                       NULL,
@@ -129,7 +131,9 @@ svn_client__get_revision_number(svn_revn
         /* The BASE, COMMITTED, and PREV revision keywords do not
            apply to URLs. */
         if (svn_path_is_url(local_abspath))
-          goto invalid_rev_arg;
+          return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL,
+                                  _("PREV, BASE, or COMMITTED revision "
+                                    "keywords are invalid for URL"));
 
         SVN_ERR(svn_wc__node_get_changed_info(revnum, NULL, NULL,
                                               wc_ctx, local_abspath,
@@ -183,10 +187,4 @@ svn_client__get_revision_number(svn_revn
     *revnum = *youngest_rev;
 
   return SVN_NO_ERROR;
-
-  invalid_rev_arg:
-    return svn_error_create(
-      SVN_ERR_CLIENT_BAD_REVISION, NULL,
-      _("PREV, BASE, or COMMITTED revision keywords are invalid for URL"));
-
 }



Mime
View raw message