Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/factor fix for OpenSSL-1.1
details: https://anonhg.NetBSD.org/src/rev/ff220c31baf4
branches: trunk
changeset: 359296:ff220c31baf4
user: christos <christos%NetBSD.org@localhost>
date: Tue Feb 06 16:53:27 2018 +0000
description:
fix for OpenSSL-1.1
diffstat:
games/factor/factor.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (51 lines):
diff -r 8983f10392e4 -r ff220c31baf4 games/factor/factor.c
--- a/games/factor/factor.c Tue Feb 06 15:48:46 2018 +0000
+++ b/games/factor/factor.c Tue Feb 06 16:53:27 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: factor.c,v 1.28 2017/11/11 23:48:44 rin Exp $ */
+/* $NetBSD: factor.c,v 1.29 2018/02/06 16:53:27 christos Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)factor.c 8.4 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: factor.c,v 1.28 2017/11/11 23:48:44 rin Exp $");
+__RCSID("$NetBSD: factor.c,v 1.29 2018/02/06 16:53:27 christos Exp $");
#endif
#endif /* not lint */
@@ -234,8 +234,8 @@
BN_set_word(bnfact, (BN_ULONG)*(fact - 1));
BN_sqr(bnfact, bnfact, ctx);
if (BN_cmp(bnfact, val) > 0
- || BN_is_prime(val, PRIME_CHECKS, NULL, NULL,
- NULL) == 1) {
+ || BN_is_prime_ex(val, PRIME_CHECKS, NULL, NULL)
+ == 1) {
putchar(' ');
BN_print_dec_fp(stdout, val);
} else
@@ -326,8 +326,8 @@
BN_gcd(tmp, tmp, val, ctx);
if (!BN_is_one(tmp)) {
- if (BN_is_prime(tmp, PRIME_CHECKS, NULL, NULL,
- NULL) == 1) {
+ if (BN_is_prime_ex(tmp, PRIME_CHECKS, NULL, NULL) == 1)
+ {
putchar(' ');
BN_print_dec_fp(stdout, tmp);
} else {
@@ -346,8 +346,8 @@
BN_div(num, NULL, val, tmp, ctx);
if (BN_is_one(num))
return;
- if (BN_is_prime(num, PRIME_CHECKS, NULL, NULL,
- NULL) == 1) {
+ if (BN_is_prime_ex(num, PRIME_CHECKS, NULL, NULL) == 1)
+ {
putchar(' ');
BN_print_dec_fp(stdout, num);
fflush(stdout);
Home |
Main Index |
Thread Index |
Old Index