This commit is contained in:
itojun 2003-09-09 11:39:14 +00:00
parent 3de6998961
commit 494fe70198
1 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip6_id.c,v 1.5 2003/09/06 13:47:09 itojun Exp $ */
/* $NetBSD: ip6_id.c,v 1.6 2003/09/09 11:39:14 itojun Exp $ */
/* $KAME: ip6_id.c,v 1.8 2003/09/06 13:41:06 itojun Exp $ */
/* $OpenBSD: ip_id.c,v 1.6 2002/03/15 18:19:52 millert Exp $ */
@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ip6_id.c,v 1.5 2003/09/06 13:47:09 itojun Exp $");
__KERNEL_RCSID(0, "$NetBSD: ip6_id.c,v 1.6 2003/09/09 11:39:14 itojun Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -127,7 +127,7 @@ static struct randomtab randomtab_32 = {
2147483629, /* RU_N-1 = 2^2*3^2*59652323 */
7, /* determine ru_a as RU_AGEN^(2*rand) */
1836660096, /* RU_M = 2^7*3^15 - don't change */
{ 2, 3, 59652323, -1 }, /* factors of ru_n */
{ 2, 3, 59652323, 0 }, /* factors of ru_n */
};
static struct randomtab randomtab_20 = {
@ -138,7 +138,7 @@ static struct randomtab randomtab_20 = {
524269, /* RU_N-1 = 2^2*3^2*14563 */
7, /* determine ru_a as RU_AGEN^(2*rand) */
279936, /* RU_M = 2^7*3^7 - don't change */
{ 2, 3, 14563, -1 }, /* factors of ru_n */
{ 2, 3, 14563, 0 }, /* factors of ru_n */
};
static u_int32_t pmod(u_int32_t, u_int32_t, u_int32_t);
@ -206,7 +206,7 @@ initid(struct randomtab *p)
if (j % p->pfacts[i] == 0)
break;
if (p->pfacts[i] <= 0)
if (p->pfacts[i] == 0)
noprime = 0;
else
j = (j + 1) % p->ru_n;