]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
1) Fix longstanding math bug with denominator > 1 (wrong probability).
authorache <ache@FreeBSD.org>
Fri, 8 Aug 2008 02:46:47 +0000 (02:46 +0000)
committerache <ache@FreeBSD.org>
Fri, 8 Aug 2008 02:46:47 +0000 (02:46 +0000)
commit42825e9561229aeb9c6ca0cc9a84fc439960f241
treecb1e18eaabc237340aafc9f33b13f71f70f4ff3a
parent823689b09c9db6b0a03a78837e4c02b453e37d8d
1) Fix longstanding math bug with denominator > 1 (wrong probability).
Test case:
random -f some_small_file 10000
(in most cases must be no output)
2) Prevent number of lines > RANDOM_MAX (overflow or nothing may be
choosed) with EFBIG err()
3) After line is found, terminate list loop for -U case too,
since nothing to do in the rest of the loop left.
games/random/randomize_fd.c