Commit eb73897adea2e2e414279e5850de976802c6f022

Con Kolivas 2013-10-31T23:35:43

Use round for stratum share diff display instead of floor.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/cgminer.c b/cgminer.c
index 9278cf5..30cc7f9 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5161,7 +5161,7 @@ static void stratum_share_result(json_t *val, json_t *res_val, json_t *err_val,
 	int intdiff;
 
 	hash32 = (uint32_t *)(work->hash);
-	intdiff = floor(work->work_difficulty);
+	intdiff = round(work->work_difficulty);
 	suffix_string(work->share_diff, diffdisp, sizeof (diffdisp), 0);
 	snprintf(hashshow, sizeof(hashshow),
 		"%08lx Diff %s/%d%s", (unsigned long)htole32(hash32[6]), diffdisp, intdiff,