diff options
author | Jeff Trawick <trawick@apache.org> | 2001-08-15 02:47:22 +0000 |
---|---|---|
committer | Jeff Trawick <trawick@apache.org> | 2001-08-15 02:47:22 +0000 |
commit | 7f80287843a86e7b40d6345142e61ca131ff7f5a (patch) | |
tree | 11209250a1843c0eab43f3c73039c803ea1bd29e /shmem | |
parent | 9c3666684bbbbaecce1f979323422302cb6a6888 (diff) | |
download | apr-7f80287843a86e7b40d6345142e61ca131ff7f5a.tar.gz |
don't do arithmetic with void *
this definitely clears up warnings on Tru64 and should get APR building
again on HP-UX, where this is an error
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62165 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r-- | shmem/unix/shmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/shmem/unix/shmem.c b/shmem/unix/shmem.c index 2ebcea5f0..33febcde2 100644 --- a/shmem/unix/shmem.c +++ b/shmem/unix/shmem.c @@ -230,10 +230,10 @@ APR_DECLARE(void *) apr_shm_malloc(apr_shmem_t *m, apr_size_t reqsize) apr_lock_acquire(m->lock); /* Do we have enough space? */ - if ((m->curmem - m->mem + reqsize) <= m->length) + if (((char *)m->curmem - (char *)m->mem + reqsize) <= m->length) { new = m->curmem; - m->curmem += reqsize; + m->curmem = (char *)m->curmem + reqsize; } apr_lock_release(m->lock); return new; @@ -310,7 +310,7 @@ APR_DECLARE(apr_status_t) apr_shm_avail(apr_shmem_t *m, apr_size_t *size) apr_lock_acquire(m->lock); - *size = m->length - (m->curmem - m->mem); + *size = m->length - ((char *)m->curmem - (char *)m->mem); if (*size) status = APR_SUCCESS; |