summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2001-07-25 21:12:45 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2001-07-25 21:12:45 +0000
commit5ccc4eb814fd9f61ebfc41f9fa16cc49b5227c49 (patch)
treececeb49890a45ab2c68a5dc5283d339a6e38facc
parent83cf542b3d85932c2b7803f1d2fe52d6f8002ad1 (diff)
downloadhttpd-5ccc4eb814fd9f61ebfc41f9fa16cc49b5227c49.tar.gz
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
-rw-r--r--modules/mappers/mod_rewrite.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mappers/mod_rewrite.c b/modules/mappers/mod_rewrite.c
index cef06cef8f..c80181687b 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)