diff options
-rw-r--r-- | tables/apr_skiplist.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tables/apr_skiplist.c b/tables/apr_skiplist.c index b5027ecf7..5ea8643db 100644 --- a/tables/apr_skiplist.c +++ b/tables/apr_skiplist.c @@ -63,13 +63,12 @@ struct apr_skiplistnode { static int get_b_rand(void) { static int ph = 32; /* More bits than we will ever use */ - static apr_uint32_t randseq; + static int randseq; if (ph > 31) { /* Num bits in return of rand() */ ph = 0; - randseq = (apr_uint32_t) rand(); + randseq = rand(); } - ph++; - return ((randseq & (1 << (ph - 1))) >> (ph - 1)); + return randseq & (1 << ph++); } typedef struct { |