Skip to content

Commit

Permalink
Fix bit_array Test on big endian
Browse files Browse the repository at this point in the history
Signed-off-by: namrata-ibm <[email protected]>
  • Loading branch information
namrata-ibm committed Jun 12, 2024
1 parent 144759d commit 69c7487
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/common/common/bit_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,14 @@ class BitArray {
}

static inline void storeUnsignedWord(void* destination, uint64_t value) {
value = htole64(value);
safeMemcpyUnsafeDst(destination, &value);
}

static inline uint64_t loadUnsignedWord(const void* source) {
uint64_t destination;
safeMemcpyUnsafeSrc(&destination, source);
return destination;
return le64toh(destination);
}

// Backing storage for the underlying array of bits.
Expand Down

0 comments on commit 69c7487

Please sign in to comment.