Browse Source

Use proper endian conversion macros for fulltest

Luke Dashjr 13 years ago
parent
commit
4d915aa298
1 changed files with 2 additions and 7 deletions
  1. 2 7
      util.c

+ 2 - 7
util.c

@@ -584,13 +584,8 @@ 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) {