From: William A. Rowe Jr Date: Wed, 25 Jul 2001 21:12:45 +0000 (+0000) Subject: Some cast magic for intentional float/int transformations. X-Git-Tag: 2.0.22~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ccc4eb814fd9f61ebfc41f9fa16cc49b5227c49;p=thirdparty%2Fapache%2Fhttpd.git Some cast magic for intentional float/int transformations. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89711 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c index cef06cef8fc..c80181687b1 100644 --- a/modules/mappers/mod_rewrite.c +++ b/modules/mappers/mod_rewrite.c @@ -2479,7 +2479,7 @@ static void reduce_uri(request_rec *r) 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 @@ static int rewrite_rand(int l, int h) * 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)