subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1702893 - /subversion/trunk/subversion/libsvn_subr/utf.c
Date Mon, 14 Sep 2015 09:58:37 GMT
Author: rhuijben
Date: Mon Sep 14 09:58:37 2015
New Revision: 1702893

URL: http://svn.apache.org/r1702893
Log:
* subversion/libsvn_subr/utf.c
  (svn_utf_string_from_utf8,
   svn_utf_cstring_from_utf8_string): Reduce scope of variable to get rid of a
     warning.

Modified:
    subversion/trunk/subversion/libsvn_subr/utf.c

Modified: subversion/trunk/subversion/libsvn_subr/utf.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf.c?rev=1702893&r1=1702892&r2=1702893&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf.c (original)
+++ subversion/trunk/subversion/libsvn_subr/utf.c Mon Sep 14 09:58:37 2015
@@ -860,7 +860,6 @@ svn_utf_string_from_utf8(const svn_strin
                          const svn_string_t *src,
                          apr_pool_t *pool)
 {
-  svn_stringbuf_t *dbuf;
   xlate_handle_node_t *node;
   svn_error_t *err;
 
@@ -870,10 +869,15 @@ svn_utf_string_from_utf8(const svn_strin
     {
       err = check_utf8(src->data, src->len, pool);
       if (! err)
-        err = convert_to_stringbuf(node, src->data, src->len,
-                                   &dbuf, pool);
-      if (! err)
-        *dest = svn_stringbuf__morph_into_string(dbuf);
+        {
+          svn_stringbuf_t *dbuf;
+
+          err = convert_to_stringbuf(node, src->data, src->len,
+                                     &dbuf, pool);
+
+          if (! err)
+            *dest = svn_stringbuf__morph_into_string(dbuf);
+        }
     }
   else
     {
@@ -991,7 +995,6 @@ svn_utf_cstring_from_utf8_string(const c
                                  const svn_string_t *src,
                                  apr_pool_t *pool)
 {
-  svn_stringbuf_t *dbuf;
   xlate_handle_node_t *node;
   svn_error_t *err;
 
@@ -1001,10 +1004,14 @@ svn_utf_cstring_from_utf8_string(const c
     {
       err = check_utf8(src->data, src->len, pool);
       if (! err)
-        err = convert_to_stringbuf(node, src->data, src->len,
-                                   &dbuf, pool);
-      if (! err)
-        *dest = dbuf->data;
+        {
+          svn_stringbuf_t *dbuf;
+
+          err = convert_to_stringbuf(node, src->data, src->len,
+                                     &dbuf, pool);
+          if (! err)
+            *dest = dbuf->data;
+        }
     }
   else
     {



Mime
View raw message