View | Details | Raw Unified | Return to bug 235358
Collapse All | Expand All

(-)files/patch-src_cpp-ethereum_libethash_endian.h (+26 lines)
Line 0 Link Here
1
--- src/cpp-ethereum/libethash/endian.h.orig	2019-01-31 14:50:45 UTC
2
+++ src/cpp-ethereum/libethash/endian.h
3
@@ -55,20 +55,10 @@
4
 
5
 #define fix_endian32(dst_, src_) dst_ = ethash_swap_u32(src_)
6
 #define fix_endian32_same(val_) val_ = ethash_swap_u32(val_)
7
-#define fix_endian64(dst_, src_) dst_ = ethash_swap_u64(src_
8
+#define fix_endian64(dst_, src_) dst_ = ethash_swap_u64(src_)
9
 #define fix_endian64_same(val_) val_ = ethash_swap_u64(val_)
10
-#define fix_endian_arr32(arr_, size_)			\
11
-	do {										\
12
-	for (unsigned i_ = 0; i_ < (size_), ++i_) { \
13
-		arr_[i_] = ethash_swap_u32(arr_[i_]);	\
14
-	}											\
15
-	while (0)
16
-#define fix_endian_arr64(arr_, size_)			\
17
-	do {										\
18
-	for (unsigned i_ = 0; i_ < (size_), ++i_) { \
19
-		arr_[i_] = ethash_swap_u64(arr_[i_]);	\
20
-	}											\
21
-	while (0)									\
22
+#define fix_endian_arr32(arr_, size_) for (unsigned i_ = 0; i_ < (size_); ++i_) arr_[i_] = ethash_swap_u32(arr_[i_])
23
+#define fix_endian_arr64(arr_, size_) for (unsigned i_ = 0; i_ < (size_); ++i_) arr_[i_] = ethash_swap_u64(arr_[i_])
24
 
25
 #else
26
 # error "endian not supported"
(-)files/patch-src_cpp-ethereum_libethash_internal.c (+20 lines)
Line 0 Link Here
1
--- src/cpp-ethereum/libethash/internal.c.orig	2019-01-31 14:52:30 UTC
2
+++ src/cpp-ethereum/libethash/internal.c
3
@@ -220,7 +220,7 @@ static bool ethash_hash(
4
 	ethash_light_t const light,
5
 	uint64_t full_size,
6
 	ethash_h256_t const header_hash,
7
-	uint64_t const nonce
8
+	uint64_t nonce
9
 )
10
 {
11
 	if (full_size % MIX_WORDS != 0) {
12
@@ -328,7 +328,7 @@ static bool ethash_hash(
13
 void ethash_quick_hash(
14
 	ethash_h256_t* return_hash,
15
 	ethash_h256_t const* header_hash,
16
-	uint64_t const nonce,
17
+	uint64_t nonce,
18
 	ethash_h256_t const* mix_hash
19
 )
20
 {

Return to bug 235358