diff options
author | William A. Rowe Jr <wrowe@apache.org> | 2007-10-14 19:12:00 +0000 |
---|---|---|
committer | William A. Rowe Jr <wrowe@apache.org> | 2007-10-14 19:12:00 +0000 |
commit | 358ada733bb8cf547c2426b7ff7fe144f7ae5399 (patch) | |
tree | f936a00b079dea8413a5d3462738fdea85529a58 /file_io | |
parent | b4a068054e2d5bfa8c090932d11014a1d24d2c58 (diff) | |
download | apr-358ada733bb8cf547c2426b7ff7fe144f7ae5399.tar.gz |
Here is the correct cast for signed-ness where size_t is off_t
bytes long, while size_t is unsigned and off_t is usually signed.
This is true of Windows/x64
This solves the emit without causing truncation, we have the
assumption that off_t can't possibly be smaller than size_t
(or how would one have a swapfile :)
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584581 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'file_io')
-rw-r--r-- | file_io/win32/seek.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/file_io/win32/seek.c b/file_io/win32/seek.c index abebde85d..53e53dd7d 100644 --- a/file_io/win32/seek.c +++ b/file_io/win32/seek.c @@ -39,7 +39,7 @@ static apr_status_t setptr(apr_file_t *thefile, apr_off_t pos ) */ newbufpos = pos - (thefile->filePtr - thefile->dataRead); - if (newbufpos >= 0 && newbufpos <= thefile->dataRead) { + if (newbufpos >= 0 && newbufpos <= (apr_off_t)thefile->dataRead) { thefile->bufpos = (apr_size_t)newbufpos; rv = APR_SUCCESS; } else { |