Author: julianfoad
Date: Fri Oct  1 12:13:46 2010
New Revision: 1003507

URL: http://svn.apache.org/viewvc?rev=1003507&view=rev
Log:
* subversion/libsvn_delta/svndiff.c
  (decode_file_offset, decode_size): Remove an unnecessary assignment in
    the case where the decoding is incomplete, and document that case.

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=1003507&r1=1003506&r2=1003507&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/svndiff.c (original)
+++ subversion/trunk/subversion/libsvn_delta/svndiff.c Fri Oct  1 12:13:46 2010
@@ -352,10 +352,13 @@ struct decode_baton
 };
 
 
-/* Decode an svndiff-encoded integer into VAL and return a pointer to
+/* Decode an svndiff-encoded integer into *VAL and return a pointer to
    the byte after the integer.  The bytes to be decoded live in the
-   range [P..END-1].  See the comment for encode_int earlier in this
-   file for more detail on the encoding format.  */
+   range [P..END-1].  If these bytes do not contain a whole encoded
+   integer, return NULL; in this case *VAL is undefined.
+
+   See the comment for encode_int() earlier in this file for more detail on
+   the encoding format.  */
 static const unsigned char *
 decode_file_offset(svn_filesize_t *val,
                    const unsigned char *p,
@@ -381,7 +384,6 @@ decode_file_offset(svn_filesize_t *val,
       }
     }
 
-  *val = temp;
   return NULL;
 }
 
@@ -409,7 +411,6 @@ decode_size(apr_size_t *val,
       }
     }
 
-  *val = temp;
   return NULL;
 }
 


Reply via email to