apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: apr/shmem/unix shmem.c
Date Wed, 15 Aug 2001 02:47:23 GMT
trawick     01/08/14 19:47:22

  Modified:    shmem/unix shmem.c
  Log:
  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
  
  Revision  Changes    Path
  1.29      +3 -3      apr/shmem/unix/shmem.c
  
  Index: shmem.c
  ===================================================================
  RCS file: /home/cvs/apr/shmem/unix/shmem.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- shmem.c	2001/08/14 05:32:13	1.28
  +++ shmem.c	2001/08/15 02:47:22	1.29
  @@ -230,10 +230,10 @@
   
       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_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;
   
  
  
  

Mime
View raw message