summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Rahn <erahn@arista.com>2018-12-06 00:07:51 +0100
committerEthan Rahn <erahn@arista.com>2018-12-06 00:07:51 +0100
commit01e31543abab64e9a3807bed7f6eadaf463212dd (patch)
treefa4c1d90faef3a344d7ad4a41f7f349235781627
parentBumped version to 1.9.4 (diff)
downloadhaveged-01e31543abab64e9a3807bed7f6eadaf463212dd.tar.xz
haveged-01e31543abab64e9a3807bed7f6eadaf463212dd.zip
Diagnostics capture mode now works correctly by referencing the right variable during rng warmup
-rw-r--r--src/havegecollect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/havegecollect.c b/src/havegecollect.c
index 498a73e..eb57447 100644
--- a/src/havegecollect.c
+++ b/src/havegecollect.c
@@ -194,10 +194,10 @@ H_COLLECT *havege_ndcreate(/* RETURN: NULL on failure */
H_UINT t0=0;
(void)havege_gather(h_ctxt); /* first sample */
- t0 = h_ctxt->havege_tic;
+ t0 = HTICK1;
for(i=1;i<MININITRAND;i++)
(void)havege_gather(h_ctxt); /* warmup rng */
- if (h_ctxt->havege_tic==t0) { /* timer stuck? */
+ if (HTICK1==t0) { /* timer stuck? */
h_ptr->error = H_NOTIMER;
havege_nddestroy(h_ctxt);
return NULL;