diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2005-05-16 21:38:03 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2005-05-16 21:38:03 +0000 |
commit | ec846b8301ce848c7b1dd78513ba76b9793d59af (patch) | |
tree | ec1b208da9d5fbc388ebc7d0cf2e7e790830727b /file_io | |
parent | 5c1d3da8eb8ec76e1e3c67133e4c7d58c634fd05 (diff) | |
download | libapr-ec846b8301ce848c7b1dd78513ba76b9793d59af.tar.gz |
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.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@170458 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/win32/seek.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/file_io/win32/seek.c b/file_io/win32/seek.c index 8a2db7f4a..bc075e3a8 100644 --- a/file_io/win32/seek.c +++ b/file_io/win32/seek.c @@ -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 @@ static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos ) 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; } } |