aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiarhei Siamashka <siarhei.siamashka@gmail.com>2011-12-31 19:53:05 +0200
committerSiarhei Siamashka <siarhei.siamashka@gmail.com>2011-12-31 19:53:05 +0200
commit4280aca375f60981d70826091f1ece82e7cf56c5 (patch)
treed2a3c6f5e3f3c6f3c649c158717a0da471d3790f
parentea4520474ba5a966260fc5652c5248e6eab50d58 (diff)
Set hashes_done variable to 0 in order not to confuse valgrind
This variable is set by SPU code, but valgrind can't see it and complains.
-rw-r--r--cpu-miner.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpu-miner.c b/cpu-miner.c
index 8ab0cf9..160c1c3 100644
--- a/cpu-miner.c
+++ b/cpu-miner.c
@@ -574,6 +574,7 @@ static void *miner_thread(void *userdata)
memcpy(argp->data, work.data, sizeof(work.data));
memcpy(argp->target, work.target, sizeof(work.target));
argp->max_nonce = max_nonce;
+ argp->hashes_done = 0;
work_restart[thr_id].restart = 0;
spe_context_run(mythr->spe_context, &entry, 0, argp,
(void *)&work_restart[thr_id].restart, &stop_info);