From f946aa6fd2b413c999018e8038390efdbb834b0a Mon Sep 17 00:00:00 2001 From: Kano Date: Mon, 10 Feb 2014 09:47:42 +1100 Subject: [PATCH] format fix and bad variable usage fix for --benchfile --- sgminer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sgminer.c b/sgminer.c index c3549231..7d8a83dd 100644 --- a/sgminer.c +++ b/sgminer.c @@ -3075,14 +3075,14 @@ static bool benchfile_get_work(struct work *work) } } - do - { + do { benchfile_line++; // Empty lines and lines starting with '#' or '/' are ignored if (*buf != '\0' && *buf != '#' && *buf != '/') { char *commas[BENCHWORK_COUNT]; int i, j, len; + long nonce_time; commas[0] = buf; for (i = 1; i < BENCHWORK_COUNT; i++) { @@ -3128,9 +3128,9 @@ static bool benchfile_get_work(struct work *work) j += 8; } - long time = atol(commas[BENCHWORK_NONCETIME]); + nonce_time = atol(commas[BENCHWORK_NONCETIME]); - sprintf(&(item[j]), "%08lx", time); + sprintf(&(item[j]), "%08lx", nonce_time); j += 8; strcpy(&(item[j]), commas[BENCHWORK_DIFFBITS]);