From 5ccc4eb814fd9f61ebfc41f9fa16cc49b5227c49 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Wed, 25 Jul 2001 21:12:45 +0000 Subject: [PATCH] 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 --- modules/mappers/mod_rewrite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.47.2