summaryrefslogtreecommitdiff
path: root/lib/rand.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rand.c')
-rw-r--r--lib/rand.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/lib/rand.c b/lib/rand.c
deleted file mode 100644
index 76f537d..0000000
--- a/lib/rand.c
+++ /dev/null
@@ -1,20 +0,0 @@
-
-#include <assert.h>
-#include <stdio.h>
-
-unsigned long int rand_seed() {
- /*
- returns a random unsigned long integer read from the standard unix
- pseudorandom device /dev/urandom
- */
-
- FILE *f = fopen("/dev/urandom", "r");
- assert(f != NULL);
-
- unsigned long int seed;
- fread(&seed, sizeof(unsigned long int), 1, f);
-
- fclose(f);
-
- return seed;
-}