Merge "Sync with upstream NetBSD."
am: b5c1b12389
Change-Id: Ie102594cac997d017ac1d0eb5c33f600e1194212
This commit is contained in:
commit
3272d82928
3 changed files with 15 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: random.c,v 1.4 2014/06/12 20:59:46 christos Exp $ */
|
||||
/* $NetBSD: random.c,v 1.5 2016/02/08 05:27:24 dholland Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1983, 1993
|
||||
|
@ -35,7 +35,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: random.c,v 1.4 2014/06/12 20:59:46 christos Exp $");
|
||||
__RCSID("$NetBSD: random.c,v 1.5 2016/02/08 05:27:24 dholland Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -92,7 +92,7 @@ static long random_unlocked(void);
|
|||
* state information, which will allow a degree seven polynomial. (Note:
|
||||
* the zeroeth word of state information also has some other information
|
||||
* stored in it -- see setstate() for details).
|
||||
*
|
||||
*
|
||||
* The random number generation technique is a linear feedback shift register
|
||||
* approach, employing trinomials (since there are fewer terms to sum up that
|
||||
* way). In this approach, the least significant bit of all the numbers in
|
||||
|
@ -318,12 +318,12 @@ srandom(unsigned int x)
|
|||
* the break values for the different R.N.G.'s, we choose the best (largest)
|
||||
* one we can and set things up for it. srandom() is then called to
|
||||
* initialize the state information.
|
||||
*
|
||||
*
|
||||
* Note that on return from srandom(), we set state[-1] to be the type
|
||||
* multiplexed with the current value of the rear pointer; this is so
|
||||
* successive calls to initstate() won't lose this information and will be
|
||||
* able to restart with setstate().
|
||||
*
|
||||
*
|
||||
* Note: the first thing we do is save the current state, if any, just like
|
||||
* setstate() so that it doesn't matter when initstate is called.
|
||||
*
|
||||
|
@ -511,7 +511,7 @@ random(void)
|
|||
{
|
||||
static u_long randseed = 1;
|
||||
long x, hi, lo, t;
|
||||
|
||||
|
||||
/*
|
||||
* Compute x[n + 1] = (7^5 * x[n]) mod (2^31 - 1).
|
||||
* From "Random number generators: good ones are hard to find",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dst.h,v 1.1.1.4 2009/04/12 16:35:44 christos Exp $ */
|
||||
/* $NetBSD: dst.h,v 1.2 2014/08/03 19:14:24 wiz Exp $ */
|
||||
|
||||
#ifndef DST_H
|
||||
#define DST_H
|
||||
|
@ -55,7 +55,7 @@ typedef struct dst_key {
|
|||
#define dst_write_key __dst_write_key
|
||||
|
||||
/*
|
||||
* DST Crypto API defintions
|
||||
* DST Crypto API definitions
|
||||
*/
|
||||
void dst_init(void);
|
||||
int dst_check_algorithm(const int);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: regcomp.c,v 1.36 2015/09/12 19:08:47 christos Exp $ */
|
||||
/* $NetBSD: regcomp.c,v 1.38 2019/02/07 22:22:31 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993, 1994
|
||||
|
@ -76,7 +76,7 @@
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)regcomp.c 8.5 (Berkeley) 3/20/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: regcomp.c,v 1.36 2015/09/12 19:08:47 christos Exp $");
|
||||
__RCSID("$NetBSD: regcomp.c,v 1.38 2019/02/07 22:22:31 christos Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
|
@ -474,6 +474,8 @@ p_ere_exp(
|
|||
REQUIRE(!MORE() || !isdigit((unsigned char)PEEK()), REG_BADRPT);
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
if (p->error != 0)
|
||||
return;
|
||||
ordinary(p, c);
|
||||
break;
|
||||
}
|
||||
|
@ -692,6 +694,8 @@ p_simp_re(
|
|||
REQUIRE(starordinary, REG_BADRPT);
|
||||
/* FALLTHROUGH */
|
||||
default:
|
||||
if (p->error != 0)
|
||||
return(0);
|
||||
ordinary(p, c &~ BACKSL);
|
||||
break;
|
||||
}
|
||||
|
@ -1007,7 +1011,7 @@ p_b_coll_elem(
|
|||
}
|
||||
len = p->next - sp;
|
||||
for (cp = cnames; cp->name != NULL; cp++)
|
||||
if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
|
||||
if (strncmp(cp->name, sp, len) == 0 && strlen(cp->name) == len)
|
||||
return(cp->code); /* known name */
|
||||
if (len == 1)
|
||||
return(*sp); /* single character */
|
||||
|
|
Loading…
Reference in a new issue