cvs commit: src/games/random randomize_fd.c

Andrey A. Chernov ache at FreeBSD.org
Fri Aug 8 02:47:03 UTC 2008


ache        2008-08-08 02:46:47 UTC

  FreeBSD src repository

  Modified files:
    games/random         randomize_fd.c 
  Log:
  SVN rev 181412 on 2008-08-08 02:46:47Z by ache
  
  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.
  
  Revision  Changes    Path
  1.5       +16 -8     src/games/random/randomize_fd.c


More information about the cvs-src mailing list