subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1685282 - /subversion/trunk/subversion/libsvn_delta/svndiff.c
Date Sat, 13 Jun 2015 16:12:02 GMT
Author: ivan
Date: Sat Jun 13 16:12:02 2015
New Revision: 1685282

URL: http://svn.apache.org/r1685282
Log:
* subversion/libsvn_delta/svndiff.c
  (encode_window): Reduce scope of I1 variable and rename it to
   COMPRESSED_INSTRUCTION for clarity.

Modified:
    subversion/trunk/subversion/libsvn_delta/svndiff.c

Modified: subversion/trunk/subversion/libsvn_delta/svndiff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/svndiff.c?rev=1685282&r1=1685281&r2=1685282&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/trunk/subversion/libsvn_delta/svndiff.c Sat Jun 13 16:12:02 2015
@@ -161,7 +161,6 @@ encode_window(svn_stringbuf_t **instruct
               apr_pool_t *pool)
 {
   svn_stringbuf_t *instructions;
-  svn_stringbuf_t *i1;
   svn_stringbuf_t *header;
   const svn_string_t *newdata;
   unsigned char ibuf[MAX_INSTRUCTION_LEN], *ip;
@@ -169,7 +168,6 @@ encode_window(svn_stringbuf_t **instruct
 
   /* create the necessary data buffers */
   instructions = svn_stringbuf_create_empty(pool);
-  i1 = svn_stringbuf_create_empty(pool);
   header = svn_stringbuf_create_empty(pool);
 
   /* Encode the instructions.  */
@@ -198,9 +196,11 @@ encode_window(svn_stringbuf_t **instruct
   append_encoded_int(header, window->tview_len);
   if (version == 1)
     {
+      svn_stringbuf_t *compressed_instructions;
+      compressed_instructions = svn_stringbuf_create_empty(pool);
       SVN_ERR(svn__compress(instructions->data, instructions->len,
-                            i1, compression_level));
-      instructions = i1;
+                            compressed_instructions, compression_level));
+      instructions = compressed_instructions;
     }
   append_encoded_int(header, instructions->len);
   if (version == 1)



Mime
View raw message