Commit 3c61a51ea508944c23cd87c39e13c850252c1b68

Con Kolivas 2013-04-22T09:48:41

Use system host to endian functions for clarity in fulltest.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/util.c b/util.c
index 131cbc8..108bc72 100644
--- a/util.c
+++ b/util.c
@@ -638,13 +638,9 @@ bool fulltest(const unsigned char *hash, const unsigned char *target)
 	swap256(target_swap, target);
 
 	for (i = 0; i < 32/4; i++) {
-#ifdef MIPSEB
-		uint32_t h32tmp = hash32[i];
-		uint32_t t32tmp = swab32(target32[i]);
-#else
-		uint32_t h32tmp = swab32(hash32[i]);
-		uint32_t t32tmp = target32[i];
-#endif
+		uint32_t h32tmp = htobe32(hash32[i]);
+		uint32_t t32tmp = htole32(target32[i]);
+
 		target32[i] = swab32(target32[i]);	/* for printing */
 
 		if (h32tmp > t32tmp) {