subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1663250 - /subversion/trunk/subversion/libsvn_fs/fs-loader.c
Date Mon, 02 Mar 2015 10:47:52 GMT
Author: rhuijben
Date: Mon Mar  2 10:47:51 2015
New Revision: 1663250

URL: http://svn.apache.org/r1663250
Log:
* subversion/libsvn_fs/fs-loader.c
  (svn_fs_lock_many): Move some code in an existing if block to avoid compiler
    warning on using potentially uninitialized c.

Modified:
    subversion/trunk/subversion/libsvn_fs/fs-loader.c

Modified: subversion/trunk/subversion/libsvn_fs/fs-loader.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs/fs-loader.c?rev=1663250&r1=1663249&r2=1663250&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs/fs-loader.c (original)
+++ subversion/trunk/subversion/libsvn_fs/fs-loader.c Mon Mar  2 10:47:51 2015
@@ -1636,20 +1636,23 @@ svn_fs_lock_many(svn_fs_t *fs,
                                     target->token, "opaquelocktoken");
 
           if (!err)
-            for (c = target->token; *c && !err; c++)
-              if (! svn_ctype_isascii(*c) || svn_ctype_iscntrl(*c))
-                err = svn_error_createf(
-                        SVN_ERR_FS_BAD_LOCK_TOKEN, NULL,
-                        _("Lock token '%s' is not ASCII or is a "
-                          "control character at byte %u"),
-                        target->token,
-                        (unsigned)(c - target->token));
+            {
+              for (c = target->token; *c && !err; c++)
+                if (! svn_ctype_isascii(*c) || svn_ctype_iscntrl(*c))
+                  err = svn_error_createf(
+                          SVN_ERR_FS_BAD_LOCK_TOKEN, NULL,
+                          _("Lock token '%s' is not ASCII or is a "
+                            "control character at byte %u"),
+                          target->token,
+                          (unsigned)(c - target->token));
 
-          /* strlen(token) == c - token. */
-          if (!err && !svn_xml_is_xml_safe(target->token, c - target->token))
-            err = svn_error_createf(SVN_ERR_FS_BAD_LOCK_TOKEN, NULL,
-                                    _("Lock token URI '%s' is not XML-safe"),
-                                    target->token);
+              /* strlen(token) == c - token. */
+              if (!err && !svn_xml_is_xml_safe(target->token,
+                                               c - target->token))
+              err = svn_error_createf(SVN_ERR_FS_BAD_LOCK_TOKEN, NULL,
+                                      _("Lock token URI '%s' is not XML-safe"),
+                                      target->token);
+            }
         }
 
       if (err)



Mime
View raw message