diff options
| author | Philipp Klaus <philipp.klaus@gmail.com> | 2011-06-21 17:12:21 +0200 |
|---|---|---|
| committer | Philipp Klaus <philipp.klaus@gmail.com> | 2011-06-21 17:12:21 +0200 |
| commit | a067bd488fb1ad0ce4818c6601031554397c1d80 (patch) | |
| tree | 7abf7fae76c0e77e17abaa83a2ca01030824661b /randnum.c | |
| parent | 468a1f0c5bd165b6d0647b184885eb2040d7ddf4 (diff) | |
| download | pwgen-a067bd488fb1ad0ce4818c6601031554397c1d80.zip | |
automatic commit for pwgen-2.03
Diffstat (limited to 'randnum.c')
| -rw-r--r-- | randnum.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -47,7 +47,7 @@ static int get_random_fd(void) #ifdef HAVE_DRAND48 drand48(); #else - rand(); + random(); #endif return fd; } @@ -84,7 +84,7 @@ int pw_random_number(int max_num) /* OK, we weren't able to use /dev/random, fall back to rand/rand48 */ -#ifdef RAND48 +#ifdef HAVE_DRAND48 return ((int) ((drand48() * max_num))); #else return ((int) (random() / ((float) RAND_MAX) * max_num)); |