httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_rewrite.c
Date Wed, 25 Jul 2001 21:12:45 GMT
wrowe       01/07/25 14:12:45

  Modified:    modules/mappers mod_rewrite.c
  Log:
    Some cast magic for intentional float/int transformations.
  
  Revision  Changes    Path
  1.80      +2 -2      httpd-2.0/modules/mappers/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- mod_rewrite.c	2001/07/18 19:41:20	1.79
  +++ mod_rewrite.c	2001/07/25 21:12:45	1.80
  @@ -2479,7 +2479,7 @@
       char host[LONG_STRING_LEN];
       char buf[MAX_STRING_LEN];
       char *olduri;
  -    int l;
  +    apr_size_t l;
   
       cp = (char *)ap_http_method(r);
       l  = strlen(cp);
  @@ -3041,7 +3041,7 @@
        * result. Doing an integer modulus would only use the lower-order bits
        * which may not be as uniformly random.
        */
  -    return ((double)(rand() % RAND_MAX) / RAND_MAX) * (h - l + 1) + l;
  +    return (int)((double)(rand() % RAND_MAX) / RAND_MAX) * (h - l + 1) + l;
   }
   
   static char *select_random_value_part(request_rec *r, char *value)
  
  
  

Mime
View raw message