summaryrefslogtreecommitdiffstats
path: root/games/robots/rnd_pos.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-09-24 22:33:22 +0000
committerache <ache@FreeBSD.org>1997-09-24 22:33:22 +0000
commit518e6e69bd606782d2c6d77cd02fcf268ee4736f (patch)
tree5f90ef80ec576868d37ba2ac3abf18b6f9350c35 /games/robots/rnd_pos.c
parent513b27d707a719622681efb710210a75b5801802 (diff)
downloadFreeBSD-src-518e6e69bd606782d2c6d77cd02fcf268ee4736f.zip
FreeBSD-src-518e6e69bd606782d2c6d77cd02fcf268ee4736f.tar.gz
Convert to random()
Cleanup
Diffstat (limited to 'games/robots/rnd_pos.c')
-rw-r--r--games/robots/rnd_pos.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/games/robots/rnd_pos.c b/games/robots/rnd_pos.c
index f61609a..348bf35 100644
--- a/games/robots/rnd_pos.c
+++ b/games/robots/rnd_pos.c
@@ -35,6 +35,7 @@
static char sccsid[] = "@(#)rnd_pos.c 8.1 (Berkeley) 5/31/93";
#endif /* not lint */
+# include <stdlib.h>
# include "robots.h"
# define IS_SAME(p,y,x) ((p).y != -1 && (p).y == y && (p).x == x)
@@ -62,7 +63,5 @@ rnd_pos()
rnd(range)
int range;
{
- unsigned int rand();
-
- return rand() % range;
+ return random() % range;
}
OpenPOWER on IntegriCloud