Browse Source

size_t n in initstate(); XPG

OPENBSD_2_3
deraadt 27 years ago
parent
commit
a559e2f17b
3 changed files with 6 additions and 6 deletions
  1. +2
    -2
      src/include/stdlib.h
  2. +2
    -2
      src/lib/libc/stdlib/random.3
  3. +2
    -2
      src/lib/libc/stdlib/random.c

+ 2
- 2
src/include/stdlib.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stdlib.h,v 1.5 1997/12/09 13:32:36 deraadt Exp $ */
/* $OpenBSD: stdlib.h,v 1.6 1998/02/06 01:49:06 deraadt Exp $ */
/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */ /* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */
/*- /*-
@ -166,7 +166,7 @@ int radixsort __P((const unsigned char **, int, const unsigned char *,
int sradixsort __P((const unsigned char **, int, const unsigned char *, int sradixsort __P((const unsigned char **, int, const unsigned char *,
unsigned)); unsigned));
char *initstate __P((unsigned, char *, int));
char *initstate __P((unsigned, char *, size_t));
long random __P((void)); long random __P((void));
char *realpath __P((const char *, char *)); char *realpath __P((const char *, char *));
char *setstate __P((char *)); char *setstate __P((char *));


+ 2
- 2
src/lib/libc/stdlib/random.3 View File

@ -29,7 +29,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE. .\" SUCH DAMAGE.
.\" .\"
.\" $OpenBSD: random.3,v 1.3 1996/08/19 08:33:46 tholo Exp $
.\" $OpenBSD: random.3,v 1.4 1998/02/06 01:49:08 deraadt Exp $
.\" .\"
.Dd April 19, 1991 .Dd April 19, 1991
.Dt RANDOM 3 .Dt RANDOM 3
@ -47,7 +47,7 @@
.Ft void .Ft void
.Fn srandom "unsigned seed" .Fn srandom "unsigned seed"
.Ft char * .Ft char *
.Fn initstate "unsigned seed" "char *state" "int n"
.Fn initstate "unsigned seed" "char *state" "size_t n"
.Ft char * .Ft char *
.Fn setstate "char *state" .Fn setstate "char *state"
.Sh DESCRIPTION .Sh DESCRIPTION


+ 2
- 2
src/lib/libc/stdlib/random.c View File

@ -32,7 +32,7 @@
*/ */
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: random.c,v 1.4 1996/09/15 09:31:51 tholo Exp $";
static char *rcsid = "$OpenBSD: random.c,v 1.5 1998/02/06 01:49:08 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include <stdio.h> #include <stdio.h>
@ -242,7 +242,7 @@ char *
initstate(seed, arg_state, n) initstate(seed, arg_state, n)
u_int seed; /* seed for R.N.G. */ u_int seed; /* seed for R.N.G. */
char *arg_state; /* pointer to state array */ char *arg_state; /* pointer to state array */
int n; /* # bytes of state info */
size_t n; /* # bytes of state info */
{ {
register char *ostate = (char *)(&state[-1]); register char *ostate = (char *)(&state[-1]);


Loading…
Cancel
Save