mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Improve internal pre-defined constant handling
Improved the way that internal pre-defined constants are managed. Removed unused internal pre-defined constants. Added code to prevent an internal pre-defined constant (that was never allocated) from being freed.
This commit is contained in:
@@ -2532,11 +2532,11 @@ zsrandom4(CONST ZVALUE seed, CONST ZVALUE ip, CONST ZVALUE iq, long trials)
|
||||
/*
|
||||
* search the 'p' and 'q' Blum prime (3 mod 4) candidates
|
||||
*/
|
||||
if (!znextcand(ip, trials, _zero_, zconst[3], zconst[4], &p)) {
|
||||
if (!znextcand(ip, trials, _zero_, _three_, _four_, &p)) {
|
||||
math_error("failed to find 1st Blum prime");
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
if (!znextcand(iq, trials, _zero_, zconst[3], zconst[4], &q)) {
|
||||
if (!znextcand(iq, trials, _zero_, _three_, _four_, &q)) {
|
||||
math_error("failed to find 2nd Blum prime");
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
Reference in New Issue
Block a user