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/05 08:56:30 UTC

svn commit: r582098 - /apr/apr/branches/1.2.x/mmap/unix/common.c

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;