From ceba869a91cb4e95d116679b964759f163373556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C5=8Dshin?= Date: Thu, 27 Dec 2018 17:22:52 -0800 Subject: [PATCH] Eliminate extra c3_rand call --- vere/sist.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/vere/sist.c b/vere/sist.c index 755c34c3a3..6a9c57cebe 100644 --- a/vere/sist.c +++ b/vere/sist.c @@ -542,23 +542,15 @@ _sist_zest() u3Z->lug_u.fid_i = fid_i; } - // Generate a 31-bit salt. + // Generate a 31-bit salt and 64-bit passcode. // { - c3_w rad_w[16]; + u3_noun pas; + c3_w rad_w[16]; c3_rand(rad_w); sal_l = (0x7fffffff & rad_w[0]); - } - - // Create and save a passcode. - // - { - c3_w rad_w[16]; - u3_noun pas; - - c3_rand(rad_w); - pas = u3i_words(2, rad_w); + pas = u3i_words(2, rad_w + 1); u3A->key = _sist_fatt(sal_l, u3k(pas)); _sist_fast(pas, u3r_mug(u3A->key));