summaryrefslogtreecommitdiff
path: root/mmap
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2007-10-05 06:56:11 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2007-10-05 06:56:11 +0000
commit3dbe4a79921333cc296c174208a0f99e6f5c494f (patch)
treec404381c2b0f018b65b87ee1e627b3a999a484f9 /mmap
parent6f414fe79515e38d7fd1df33c82509e133bba12c (diff)
downloadapr-3dbe4a79921333cc296c174208a0f99e6f5c494f.tar.gz
Once we know apr_off_t size > 0, we know we can fold
it, as off_t is signed and size_t is unsigned. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@582097 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'mmap')
-rw-r--r--mmap/unix/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mmap/unix/common.c b/mmap/unix/common.c
index a97899288..1172f3c89 100644
--- a/mmap/unix/common.c
+++ b/mmap/unix/common.c
@@ -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;