subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1599572 - /subversion/trunk/subversion/libsvn_diff/binary_diff.c
Date Tue, 03 Jun 2014 14:23:07 GMT
Author: rhuijben
Date: Tue Jun  3 14:23:06 2014
New Revision: 1599572

URL: http://svn.apache.org/r1599572
Log:
* subversion/libsvn_diff/binary_diff.c
  (write_literal): Perform allocation after variable definitions to avoid C89
    errors. Fix small indentation problem.

Modified:
    subversion/trunk/subversion/libsvn_diff/binary_diff.c

Modified: subversion/trunk/subversion/libsvn_diff/binary_diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/binary_diff.c?rev=1599572&r1=1599571&r2=1599572&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/binary_diff.c (original)
+++ subversion/trunk/subversion/libsvn_diff/binary_diff.c Tue Jun  3 14:23:06 2014
@@ -116,50 +116,51 @@ write_literal(svn_filesize_t uncompresse
                             uncompressed_size));
 
   do
-  {
-    char chunk[GIT_BASE85_CHUNKSIZE];
-    rd = sizeof(chunk);
-    const char *next;
-    int left;
+    {
+      char chunk[GIT_BASE85_CHUNKSIZE];
+      const char *next;
+      int left;
 
-    if (cancel_func)
-      SVN_ERR(cancel_func(cancel_baton));
+      rd = sizeof(chunk);
 
-    SVN_ERR(svn_stream_read_full(compressed_data, chunk, &rd));
+      if (cancel_func)
+        SVN_ERR(cancel_func(cancel_baton));
 
-    {
-      apr_size_t one = 1;
-      SVN_ERR(svn_stream_write(output_stream, &b85lenstr[rd-1], &one));
-    }
+      SVN_ERR(svn_stream_read_full(compressed_data, chunk, &rd));
 
-    left = rd;
-    next = chunk;
-    while (left)
-    {
-      char five[5];
-      unsigned info = 0;
-      int n;
-      apr_size_t five_sz;
-
-      /* Push 4 bytes into the 32 bit info, when available */
-      for (n = 24; n >= 0 && left; n -= 8, next++, left--)
       {
-          info |= (*next) << n;
+        apr_size_t one = 1;
+        SVN_ERR(svn_stream_write(output_stream, &b85lenstr[rd-1], &one));
       }
 
-      /* Write out info as base85 */
-      for (n = 4; n >= 0; n--)
+      left = rd;
+      next = chunk;
+      while (left)
       {
-          five[n] = b85str[info % 85];
-          info /= 85;
+        char five[5];
+        unsigned info = 0;
+        int n;
+        apr_size_t five_sz;
+
+        /* Push 4 bytes into the 32 bit info, when available */
+        for (n = 24; n >= 0 && left; n -= 8, next++, left--)
+        {
+            info |= (*next) << n;
+        }
+
+        /* Write out info as base85 */
+        for (n = 4; n >= 0; n--)
+        {
+            five[n] = b85str[info % 85];
+            info /= 85;
+        }
+
+        five_sz = 5;
+        SVN_ERR(svn_stream_write(output_stream, five, &five_sz));
       }
 
-      five_sz = 5;
-      SVN_ERR(svn_stream_write(output_stream, five, &five_sz));
+      SVN_ERR(svn_stream_puts(output_stream, APR_EOL_STR));
     }
-
-    SVN_ERR(svn_stream_puts(output_stream, APR_EOL_STR));
-  }
   while (rd == GIT_BASE85_CHUNKSIZE);
 
   return SVN_NO_ERROR;



Mime
View raw message