summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/rand.c
diff options
context:
space:
mode:
authorrodrigc <rodrigc@FreeBSD.org>2015-09-20 20:24:28 +0000
committerrodrigc <rodrigc@FreeBSD.org>2015-09-20 20:24:28 +0000
commit5919af45fe0fdd5a425228bbc8383aa5b0798c61 (patch)
treebe0fcdcc2e09e35233a813ebe7bb4842caab3e62 /lib/libc/stdlib/rand.c
parent74c1506b3359ee725c9031331908b717460830dc (diff)
downloadFreeBSD-src-5919af45fe0fdd5a425228bbc8383aa5b0798c61.zip
FreeBSD-src-5919af45fe0fdd5a425228bbc8383aa5b0798c61.tar.gz
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
Diffstat (limited to 'lib/libc/stdlib/rand.c')
-rw-r--r--lib/libc/stdlib/rand.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c
index 4f4aa8d..b8871a2 100644
--- a/lib/libc/stdlib/rand.c
+++ b/lib/libc/stdlib/rand.c
@@ -111,14 +111,13 @@ static u_long next =
#endif
int
-rand()
+rand(void)
{
return (do_rand(&next));
}
void
-srand(seed)
-u_int seed;
+srand(u_int seed)
{
next = seed;
#ifndef USE_WEAK_SEEDING
@@ -136,7 +135,7 @@ u_int seed;
* data from the kernel.
*/
void
-sranddev()
+sranddev(void)
{
int mib[2];
size_t len;
OpenPOWER on IntegriCloud