From 823689b09c9db6b0a03a78837e4c02b453e37d8d Mon Sep 17 00:00:00 2001 From: ache Date: Fri, 8 Aug 2008 01:42:17 +0000 Subject: I was confused a bit by the wrong construction with RAND_MAX used in randomize_fd.c. Although the max value is the same currently, RAND_MAX is for rand(), not for random(). So move RANDOM_MAX const to the common file now, make it UL and use in randomize_fd.c too. (in any case its old value was 1 less then must be, as noted in the prev. commit) --- games/random/randomize_fd.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'games/random/randomize_fd.h') diff --git a/games/random/randomize_fd.h b/games/random/randomize_fd.h index 5b50e62..6f9fac2 100644 --- a/games/random/randomize_fd.h +++ b/games/random/randomize_fd.h @@ -29,6 +29,12 @@ #ifndef __RANDOMIZE_FD__ #define __RANDOMIZE_FD__ +/* + * The random() function is defined to return values between 0 and + * 2^31 - 1 inclusive in random(3). + */ +#define RANDOM_MAX 0x80000000UL + #define RANDOM_TYPE_UNSET 0 #define RANDOM_TYPE_LINES 1 #define RANDOM_TYPE_WORDS 2 -- cgit v1.1