summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorkleink <kleink@NetBSD.org>1998-02-04 21:06:14 +0000
committerkleink <kleink@NetBSD.org>1998-02-04 21:06:14 +0000
commitdf0d6631b5c47990ecc810bc9b03fb27fca4a826 (patch)
tree12d4aa4da53cb66c767b8658f71e945fe4331af5 /lib/libc/stdlib
parent90be3b559df8b9daacd67c07fa17068b96d001a7 (diff)
Per XPG4.2, change the `n' argument of initstate() to size_t. (Since it was
recently changed from int to long (lite-2 import), I saw no reason to delay this `alignment'.)
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/random.34
-rw-r--r--lib/libc/stdlib/random.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3
index 6de28c225d2..d512156d0c5 100644
--- a/lib/libc/stdlib/random.3
+++ b/lib/libc/stdlib/random.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: random.3,v 1.5 1998/01/30 23:38:03 perry Exp $
+.\" $NetBSD: random.3,v 1.6 1998/02/04 21:06:16 kleink Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -49,7 +49,7 @@
.Ft void
.Fn srandom "unsigned seed"
.Ft char *
-.Fn initstate "unsigned seed" "char *state" "int n"
+.Fn initstate "unsigned seed" "char *state" "size_t n"
.Ft char *
.Fn setstate "char *state"
.Sh DESCRIPTION
diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c
index 39f73e735e7..829aa6a7fa6 100644
--- a/lib/libc/stdlib/random.c
+++ b/lib/libc/stdlib/random.c
@@ -1,4 +1,4 @@
-/* $NetBSD: random.c,v 1.8 1998/02/03 18:44:19 perry Exp $ */
+/* $NetBSD: random.c,v 1.9 1998/02/04 21:06:18 kleink Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
#else
-__RCSID("$NetBSD: random.c,v 1.8 1998/02/03 18:44:19 perry Exp $");
+__RCSID("$NetBSD: random.c,v 1.9 1998/02/04 21:06:18 kleink Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -268,7 +268,7 @@ char *
initstate(seed, arg_state, n)
unsigned long seed; /* seed for R.N.G. */
char *arg_state; /* pointer to state array */
- long n; /* # bytes of state info */
+ size_t n; /* # bytes of state info */
{
char *ostate = (char *)(&state[-1]);
long *long_arg_state = (long *) arg_state;