You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/09/14 20:43:02 UTC

cvs commit: apache-2.0/src/support ab.c

trawick     00/09/14 11:43:00

  Modified:    src/ap   ap_buckets.c
               src/main http_core.c
               src/modules/standard mod_include.c
               src/support ab.c
  Log:
  Fix the types of the variables passed as the len parm to bucket->read()
  (in various places).
  In ab, change the declaration of argv so that it can be passed into
  apr_initopt() without warning.
  Submitted by:	Victor J. Orlikowski <v....@gte.net>
  Reviewed and modified slightly by:	Jeff Trawick
  
  Revision  Changes    Path
  1.16      +3 -1      apache-2.0/src/ap/ap_buckets.c
  
  Index: ap_buckets.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ap_buckets.c	2000/09/09 06:48:07	1.15
  +++ ap_buckets.c	2000/09/14 18:42:49	1.16
  @@ -125,12 +125,14 @@
   {
       ap_bucket *e;
       struct iovec *orig;
  +    apr_ssize_t iov_len;
   
       orig = vec;
       AP_BRIGADE_FOREACH(e, b) {
   	if (nvec-- == 0)
               break;
  -	e->read(e, (const char **)&vec->iov_base, &vec->iov_len, 0);
  +	e->read(e, (const char **)&vec->iov_base, &iov_len, 0);
  +        vec->iov_len = iov_len; /* set indirectly in case size differs */
   	++vec;
       }
       return vec - orig;
  
  
  
  1.123     +1 -2      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.122
  retrieving revision 1.123
  diff -u -r1.122 -r1.123
  --- http_core.c	2000/09/14 15:37:17	1.122
  +++ http_core.c	2000/09/14 18:42:54	1.123
  @@ -3062,9 +3062,8 @@
       request_rec *r = f->r;
   #endif
       apr_status_t rv;
  -    apr_ssize_t bytes_sent = 0;
  +    apr_ssize_t bytes_sent = 0, len = 0, written;
       ap_bucket *e;
  -    int len = 0, written;
       const char *str;
       
   #if 0 /* XXX: bit rot! */
  
  
  
  1.56      +3 -3      apache-2.0/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- mod_include.c	2000/09/14 17:59:16	1.55
  +++ mod_include.c	2000/09/14 18:42:56	1.56
  @@ -184,7 +184,7 @@
   
   static ap_bucket *find_string(ap_bucket *dptr, const char *str, ap_bucket *end)
   {
  -    int len;
  +    apr_ssize_t len;
       const char *c;
       const char *buf;
       int state = 0;
  @@ -340,7 +340,7 @@
       ap_bucket *dptr = in;
       const char *c;
       const char *str;
  -    int length; 
  +    apr_ssize_t length; 
       char *t = tag, *tag_val, term;
   
       /* makes code below a little less cluttered */
  @@ -472,7 +472,7 @@
       char *d = dest;
       const char *c;
       const char *str;
  -    int length; 
  +    apr_ssize_t length; 
   
       /* make room for nul terminator */
       --len;
  
  
  
  1.27      +3 -3      apache-2.0/src/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/support/ab.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- ab.c	2000/08/10 12:52:37	1.26
  +++ ab.c	2000/09/14 18:42:58	1.27
  @@ -862,14 +862,14 @@
   static void copyright(void)
   {
       if (!use_html) {
  -        printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.26 $> apache-2.0");
  +        printf("This is ApacheBench, Version %s\n", AB_VERSION " <$Revision: 1.27 $> apache-2.0");
           printf("Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/\n");
           printf("Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/\n");
           printf("\n");
       }
       else {
           printf("<p>\n");
  -        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.26 $");
  +        printf(" This is ApacheBench, Version %s <i>&lt;%s&gt;</i> apache-2.0<br>\n", AB_VERSION, "$Revision: 1.27 $");
           printf(" Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/<br>\n");
           printf(" Copyright (c) 1998-2000 The Apache Software Foundation, http://www.apache.org/<br>\n");
           printf("</p>\n<p>\n");
  @@ -968,7 +968,7 @@
   /* ------------------------------------------------------- */
   
   /* sort out command-line args and call test */
  -int main(int argc, char **argv)
  +int main(int argc, char *const *argv)
   {
       int r, l;
       char tmp[1024];