subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1607070 - /subversion/trunk/subversion/libsvn_diff/diff_file.c
Date Tue, 01 Jul 2014 13:26:39 GMT
Author: rhuijben
Date: Tue Jul  1 13:26:39 2014
New Revision: 1607070

URL: http://svn.apache.org/r1607070
Log:
Remove an unused argument from a static function.

* subversion/libsvn_diff/diff_file.c
  (read_chunk): Remove unused path argument.

  (increment_chunk,
   decrement_chunk,
   find_identical_suffix,
   datasources_open,
   datasource_get_next_token,
   token_compare): Update caller.

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

Modified: subversion/trunk/subversion/libsvn_diff/diff_file.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/diff_file.c?rev=1607070&r1=1607069&r2=1607070&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/diff_file.c (original)
+++ subversion/trunk/subversion/libsvn_diff/diff_file.c Tue Jul  1 13:26:39 2014
@@ -139,16 +139,16 @@ datasource_to_index(svn_diff_datasource_
  * *LENGTH.  The actual bytes read are stored in *LENGTH on return.
  */
 static APR_INLINE svn_error_t *
-read_chunk(apr_file_t *file, const char *path,
+read_chunk(apr_file_t *file,
            char *buffer, apr_off_t length,
-           apr_off_t offset, apr_pool_t *pool)
+           apr_off_t offset, apr_pool_t *scratch_pool)
 {
   /* XXX: The final offset may not be the one we asked for.
    * XXX: Check.
    */
-  SVN_ERR(svn_io_file_seek(file, APR_SET, &offset, pool));
+  SVN_ERR(svn_io_file_seek(file, APR_SET, &offset, scratch_pool));
   return svn_io_file_read_full2(file, buffer, (apr_size_t) length,
-                                NULL, NULL, pool);
+                                NULL, NULL, scratch_pool);
 }
 
 
@@ -288,7 +288,7 @@ increment_chunk(struct file_info *file, 
       file->chunk++;
       length = file->chunk == last_chunk ?
         offset_in_chunk(file->size) : CHUNK_SIZE;
-      SVN_ERR(read_chunk(file->file, file->path, file->buffer,
+      SVN_ERR(read_chunk(file->file, file->buffer,
                          length, chunk_to_offset(file->chunk),
                          pool));
       file->endp = file->buffer + length;
@@ -315,7 +315,7 @@ decrement_chunk(struct file_info *file, 
     {
       /* Read previous chunk and reset pointers. */
       file->chunk--;
-      SVN_ERR(read_chunk(file->file, file->path, file->buffer,
+      SVN_ERR(read_chunk(file->file, file->buffer,
                          CHUNK_SIZE, chunk_to_offset(file->chunk),
                          pool));
       file->endp = file->buffer + CHUNK_SIZE;
@@ -575,7 +575,7 @@ find_identical_suffix(apr_off_t *suffix_
           /* There is at least more than 1 chunk,
              so allocate full chunk size buffer */
           file_for_suffix[i].buffer = apr_palloc(pool, CHUNK_SIZE);
-          SVN_ERR(read_chunk(file_for_suffix[i].file, file_for_suffix[i].path,
+          SVN_ERR(read_chunk(file_for_suffix[i].file,
                              file_for_suffix[i].buffer, length[i],
                              chunk_to_offset(file_for_suffix[i].chunk),
                              pool));
@@ -803,7 +803,7 @@ datasources_open(void *baton,
       file->size = finfo[i].size;
       length[i] = finfo[i].size > CHUNK_SIZE ? CHUNK_SIZE : finfo[i].size;
       file->buffer = apr_palloc(file_baton->pool, (apr_size_t) length[i]);
-      SVN_ERR(read_chunk(file->file, file->path, file->buffer,
+      SVN_ERR(read_chunk(file->file, file->buffer,
                          length[i], 0, file_baton->pool));
       file->endp = file->buffer + length[i];
       file->curp = file->buffer;
@@ -971,7 +971,7 @@ datasource_get_next_token(apr_uint32_t *
          When changing things here, make sure the whitespace settings are
          applied, or we might not reach the exact suffix boundary as token
          boundary. */
-      SVN_ERR(read_chunk(file->file, file->path,
+      SVN_ERR(read_chunk(file->file,
                          curp, length,
                          chunk_to_offset(file->chunk),
                          file_baton->pool));
@@ -1113,7 +1113,6 @@ token_compare(void *baton, void *token1,
                 COMPARE_CHUNK_SIZE : raw_length[i];
 
               SVN_ERR(read_chunk(file[i]->file,
-                                 file[i]->path,
                                  bufp[i], length[i], offset[i],
                                  file_baton->pool));
               offset[i] += length[i];



Mime
View raw message