httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/include apr_buf.h
Date Wed, 12 Jul 2000 16:47:20 GMT
rbb         00/07/12 09:47:20

  Modified:    src/lib/apr/buckets ap_rmem_buf.c ap_rwmem_buf.c
               src/lib/apr/include apr_buf.h
  Log:
  Various bucket fixes.  Basically just casts the pointers to (char *) for
  the pointer arithmetic.
  Submitted by:	Victor J. Orlikowski <v.j.orlikowski@gte.net>
  Reviewed by:	Ryan Bloom
  
  Revision  Changes    Path
  1.3       +2 -2      apache-2.0/src/lib/apr/buckets/ap_rmem_buf.c
  
  Index: ap_rmem_buf.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/buckets/ap_rmem_buf.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ap_rmem_buf.c	2000/07/12 14:48:09	1.2
  +++ ap_rmem_buf.c	2000/07/12 16:47:17	1.3
  @@ -77,7 +77,7 @@
   
   APR_EXPORT(int) ap_rmem_get_len(ap_bucket_rmem *b)
   {
  -    return b->end - b->start;
  +    return (char *)b->end - (char *)b->start;
   }
   
   /*
  @@ -99,7 +99,7 @@
        * much memory, but that can wait for the second pass.
        */
       b->start = buf;
  -    b->end = b->start + nbyte;
  +    b->end = (char *)b->start + nbyte;
       *bytes_written = nbyte;
       return APR_SUCCESS;
   }
  
  
  
  1.3       +5 -5      apache-2.0/src/lib/apr/buckets/ap_rwmem_buf.c
  
  Index: ap_rwmem_buf.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/buckets/ap_rwmem_buf.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ap_rwmem_buf.c	2000/07/11 17:28:18	1.2
  +++ ap_rwmem_buf.c	2000/07/12 16:47:17	1.3
  @@ -87,13 +87,13 @@
   
   APR_EXPORT(int) ap_rwmem_get_len(ap_bucket_rwmem *b)
   {
  -    return b->end - b->start;
  +    return (char *)b->end - (char *)b->start;
   }
   
   /*
    * save nbyte bytes to the bucket.
  - * Only returns fewer than nbyte if an error ocurred.
  - * Returns -1 if no bytes were written before the error ocurred.
  + * Only returns fewer than nbyte if an error occurred.
  + * Returns -1 if no bytes were written before the error occurred.
    * It is worth noting that if an error occurs, the buffer is in an unknown
    * state.
    */
  @@ -114,7 +114,7 @@
    * leaving that for a later pass.  The basics are presented below, but this
    * is horribly broken.
    */
  -    amt = b->alloc_len - (b->end - b->start);
  +    amt = b->alloc_len - ((char *)b->end - (char *)b->start);
       total = 0;
       if (nbyte > amt) {
           /* loop through and write to the disk */
  @@ -122,7 +122,7 @@
       }
       /* now we know that nbyte < b->alloc_len */
       memcpy(b->end, buf, nbyte);
  -    b->end += nbyte;
  +    b->end = (char *)b->end + nbyte;
       *bytes_written = total + nbyte;
       return APR_SUCCESS;
   }
  
  
  
  1.5       +1 -1      apache-2.0/src/lib/apr/include/apr_buf.h
  
  Index: apr_buf.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_buf.h,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apr_buf.h	2000/07/11 22:54:16	1.4
  +++ apr_buf.h	2000/07/12 16:47:19	1.5
  @@ -73,7 +73,7 @@
       AP_BUCKET_mmap,
       AP_BUCKET_filename,
       AP_BUCKET_cached_entity,
  -    AP_BUCKET_URI,
  +    AP_BUCKET_URI
   } ap_bucket_color_e;
   
   typedef struct ap_bucket ap_bucket;
  
  
  

Mime
View raw message