From 1832804a4c6771ff86fba6064a6fb575524b64ef Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Tue, 21 Jun 2011 17:12:21 +0200 Subject: automatic commit for pwgen-2.04 --- randnum.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'randnum.c') diff --git a/randnum.c b/randnum.c index 8d88e2d..036e092 100644 --- a/randnum.c +++ b/randnum.c @@ -21,8 +21,10 @@ extern double drand48(void); #endif +static int get_random_fd(void); + /* Borrowed/adapted from e2fsprogs's UUID generation code */ -static int get_random_fd(void) +static int get_random_fd() { struct timeval tv; static int fd = -2; @@ -56,7 +58,8 @@ static int get_random_fd(void) * Generate a random number n, where 0 <= n < max_num, using * /dev/urandom if possible. */ -int pw_random_number(int max_num) +int pw_random_number(max_num) + int max_num; { int i, fd = get_random_fd(); int lose_counter = 0, nbytes=4; -- cgit v1.2.3