You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2005/05/16 23:38:04 UTC

svn commit: r170458 - /apr/apr/trunk/file_io/win32/seek.c

Author: wrowe
Date: Mon May 16 14:38:03 2005
New Revision: 170458

URL: http://svn.apache.org/viewcvs?rev=170458&view=rev
Log:

  Internal flaws, don't null out QWORD and DWORD values in the same pass,
  and the internal buff position is a mem offset, not file offset.

Modified:
    apr/apr/trunk/file_io/win32/seek.c

Modified: apr/apr/trunk/file_io/win32/seek.c
URL: http://svn.apache.org/viewcvs/apr/apr/trunk/file_io/win32/seek.c?rev=170458&r1=170457&r2=170458&view=diff
==============================================================================
--- apr/apr/trunk/file_io/win32/seek.c (original)
+++ apr/apr/trunk/file_io/win32/seek.c Mon May 16 14:38:03 2005
@@ -21,12 +21,13 @@
 
 static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos )
 {
-    apr_off_t newbufpos;
+    apr_size_t newbufpos;
     DWORD rc;
 
     if (thefile->direction == 1) {
         apr_file_flush(thefile);
-        thefile->bufpos = thefile->direction = thefile->dataRead = 0;
+        thefile->bufpos = thefile->dataRead = 0;
+        thefile->direction = 0;
     }
 
     newbufpos = pos - (thefile->filePtr - thefile->dataRead);
@@ -44,7 +45,8 @@
         else
             rc = APR_SUCCESS;
         if (rc == APR_SUCCESS) {
-            thefile->eof_hit = thefile->bufpos = thefile->dataRead = 0;
+            thefile->eof_hit = 0;
+            thefile->bufpos = thefile->dataRead = 0;
             thefile->filePtr = pos;
         }
     }