From a8cc197c711b4381e8050e0ecfc3458873f24468 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 16 Apr 2001 16:25:57 +0000 Subject: [PATCH] Fix excessive calls to random_byte() git-svn-id: svn://svn.tartarus.org/sgt/putty@1052 cda61777-01e9-0310-a592-d414129be87e --- sshprime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sshprime.c b/sshprime.c index 03f3e6fe..bd815e95 100644 --- a/sshprime.c +++ b/sshprime.c @@ -680,7 +680,7 @@ Bignum primegen(int bits, int modulus, int residue, v = 1; else { if (bitsleft <= 0) - bitsleft = 8; byte = random_byte(); + bitsleft = 8, byte = random_byte(); v = byte & 1; byte >>= 1; bitsleft--; @@ -757,7 +757,7 @@ Bignum primegen(int bits, int modulus, int residue, w = bn_power_2(bits-1); for (i = 0; i < bits; i++) { if (bitsleft <= 0) - bitsleft = 8; byte = random_byte(); + bitsleft = 8, byte = random_byte(); v = byte & 1; byte >>= 1; bitsleft--; -- 2.11.0