summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorderaadt <>1998-02-06 01:49:08 +0000
committerderaadt <>1998-02-06 01:49:08 +0000
commit3e1f199d9076db124c95fd0475b1ce73e079ac21 (patch)
tree4d2bf3b28db43c73a7865c40e806badf9b5b8491
parent41b1d7242a8ea86e10caae6482d05b00f5900341 (diff)
downloadopenbsd-3e1f199d9076db124c95fd0475b1ce73e079ac21.tar.gz
openbsd-3e1f199d9076db124c95fd0475b1ce73e079ac21.tar.bz2
openbsd-3e1f199d9076db124c95fd0475b1ce73e079ac21.zip
size_t n in initstate(); XPG
-rw-r--r--src/lib/libc/stdlib/random.34
-rw-r--r--src/lib/libc/stdlib/random.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libc/stdlib/random.3 b/src/lib/libc/stdlib/random.3
index 6188c2a431..87a4fe253f 100644
--- a/src/lib/libc/stdlib/random.3
+++ b/src/lib/libc/stdlib/random.3
@@ -29,7 +29,7 @@
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE. 30.\" SUCH DAMAGE.
31.\" 31.\"
32.\" $OpenBSD: random.3,v 1.3 1996/08/19 08:33:46 tholo Exp $ 32.\" $OpenBSD: random.3,v 1.4 1998/02/06 01:49:08 deraadt Exp $
33.\" 33.\"
34.Dd April 19, 1991 34.Dd April 19, 1991
35.Dt RANDOM 3 35.Dt RANDOM 3
@@ -47,7 +47,7 @@
47.Ft void 47.Ft void
48.Fn srandom "unsigned seed" 48.Fn srandom "unsigned seed"
49.Ft char * 49.Ft char *
50.Fn initstate "unsigned seed" "char *state" "int n" 50.Fn initstate "unsigned seed" "char *state" "size_t n"
51.Ft char * 51.Ft char *
52.Fn setstate "char *state" 52.Fn setstate "char *state"
53.Sh DESCRIPTION 53.Sh DESCRIPTION
diff --git a/src/lib/libc/stdlib/random.c b/src/lib/libc/stdlib/random.c
index 46b67b5ec7..1ac61f2cec 100644
--- a/src/lib/libc/stdlib/random.c
+++ b/src/lib/libc/stdlib/random.c
@@ -32,7 +32,7 @@
32 */ 32 */
33 33
34#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
35static char *rcsid = "$OpenBSD: random.c,v 1.4 1996/09/15 09:31:51 tholo Exp $"; 35static char *rcsid = "$OpenBSD: random.c,v 1.5 1998/02/06 01:49:08 deraadt Exp $";
36#endif /* LIBC_SCCS and not lint */ 36#endif /* LIBC_SCCS and not lint */
37 37
38#include <stdio.h> 38#include <stdio.h>
@@ -242,7 +242,7 @@ char *
242initstate(seed, arg_state, n) 242initstate(seed, arg_state, n)
243 u_int seed; /* seed for R.N.G. */ 243 u_int seed; /* seed for R.N.G. */
244 char *arg_state; /* pointer to state array */ 244 char *arg_state; /* pointer to state array */
245 int n; /* # bytes of state info */ 245 size_t n; /* # bytes of state info */
246{ 246{
247 register char *ostate = (char *)(&state[-1]); 247 register char *ostate = (char *)(&state[-1]);
248 248