Skip to content
Commit 6dda2985 authored by Ralf S. Engelschall's avatar Ralf S. Engelschall
Browse files

Make sure the returned value of rand() is not greater then RAND_MAX on systems

like SunOS where we guessed the RAND_MAX value. This the way Ben requested but
without the "+1" because this actually leaded to an overflow warning under
compiletime and is not really needed because this is random number generating
functions where it doesn't count because of the additional bounding checks.
I've tested it now under FreeBSD 2.1.5 _and_ SunOS 4.1.3 and it both correctly
gives numbers between 1 and N when run with l=1 and h=N. Nothing more is
needed....


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@80406 13f79535-47bb-0310-9956-ffa450edef68
parent 11fb05a1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment