apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r582098 - /apr/apr/branches/1.2.x/mmap/unix/common.c
Date Fri, 05 Oct 2007 06:56:30 GMT
Author: wrowe
Date: Thu Oct  4 23:56:29 2007
New Revision: 582098

URL: http://svn.apache.org/viewvc?rev=582098&view=rev
Log:
Once we know apr_off_t size > 0, we know we can fold
it, as off_t is signed and size_t is unsigned.

backport; r582097

Modified:
    apr/apr/branches/1.2.x/mmap/unix/common.c

Modified: apr/apr/branches/1.2.x/mmap/unix/common.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/mmap/unix/common.c?rev=582098&r1=582097&r2=582098&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/mmap/unix/common.c (original)
+++ apr/apr/branches/1.2.x/mmap/unix/common.c Thu Oct  4 23:56:29 2007
@@ -32,8 +32,8 @@
 
 APR_DECLARE(apr_status_t) apr_mmap_offset(void **addr, apr_mmap_t *mmap,
                                           apr_off_t offset)
-{  
-    if (offset < 0 || offset > mmap->size)
+{
+    if (offset < 0 || (apr_size_t)offset > mmap->size)
         return APR_EINVAL;
     
     (*addr) = (char *) mmap->mm + offset;



Mime
View raw message