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 2007/10/14 21:12:35 UTC
svn commit: r584582 - /apr/apr/branches/1.2.x/file_io/win32/seek.c
Author: wrowe
Date: Sun Oct 14 12:12:34 2007
New Revision: 584582
URL: http://svn.apache.org/viewvc?rev=584582&view=rev
Log:
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 :)
Modified:
apr/apr/branches/1.2.x/file_io/win32/seek.c
Modified: apr/apr/branches/1.2.x/file_io/win32/seek.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/file_io/win32/seek.c?rev=584582&r1=584581&r2=584582&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/file_io/win32/seek.c (original)
+++ apr/apr/branches/1.2.x/file_io/win32/seek.c Sun Oct 14 12:12:34 2007
@@ -39,7 +39,7 @@
*/
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 {