diff --git a/src/lib/mesg_client.cpp b/src/lib/mesg_client.cpp index 9327164..5b25869 100644 --- a/src/lib/mesg_client.cpp +++ b/src/lib/mesg_client.cpp @@ -196,7 +196,7 @@ NullAsyncResult mesg_factory::data_service_request_unidirectional(std::optional< // We ignore the vector of future response from collect all and st the value as folly::unit. // This is because we do not have a use case to handle the errors that happen during the unidirectional call to all // the peers. - return folly::collectAll(calls).deferValue([](auto &&) -> NullResult { return folly::unit; }); + return folly::collectAll(calls).deferValue([](auto&&) -> NullResult { return folly::unit; }); } AsyncResult< sisl::io_blob > diff --git a/src/tests/jungle_logstore/crc32.cc b/src/tests/jungle_logstore/crc32.cc index ae2ff73..c09ba51 100644 --- a/src/tests/jungle_logstore/crc32.cc +++ b/src/tests/jungle_logstore/crc32.cc @@ -309,8 +309,8 @@ uint32_t Crc32::get(const void* data, size_t len, uint32_t seed) { uint32_t one = *cur++ ^ crc; uint32_t two = *cur++; - crc = crc_lookup[7][(one) & 0xFF] ^ crc_lookup[6][(one >> 8) & 0xFF] ^ crc_lookup[5][(one >> 16) & 0xFF] ^ - crc_lookup[4][(one >> 24) & 0xFF] ^ crc_lookup[3][(two) & 0xFF] ^ crc_lookup[2][(two >> 8) & 0xFF] ^ + crc = crc_lookup[7][(one)&0xFF] ^ crc_lookup[6][(one >> 8) & 0xFF] ^ crc_lookup[5][(one >> 16) & 0xFF] ^ + crc_lookup[4][(one >> 24) & 0xFF] ^ crc_lookup[3][(two)&0xFF] ^ crc_lookup[2][(two >> 8) & 0xFF] ^ crc_lookup[1][(two >> 16) & 0xFF] ^ crc_lookup[0][(two >> 24) & 0xFF]; #endif len -= 8; diff --git a/src/tests/jungle_logstore/endian_encode.h b/src/tests/jungle_logstore/endian_encode.h index a7980e2..1c48dc7 100644 --- a/src/tests/jungle_logstore/endian_encode.h +++ b/src/tests/jungle_logstore/endian_encode.h @@ -52,19 +52,18 @@ #ifndef reverse_order_64 #define reverse_order_64(v) \ - ((((v) & 0xff00000000000000ULL) >> 56) | (((v) & 0x00ff000000000000ULL) >> 40) | \ - (((v) & 0x0000ff0000000000ULL) >> 24) | (((v) & 0x000000ff00000000ULL) >> 8) | \ - (((v) & 0x00000000ff000000ULL) << 8) | (((v) & 0x0000000000ff0000ULL) << 24) | \ - (((v) & 0x000000000000ff00ULL) << 40) | (((v) & 0x00000000000000ffULL) << 56)) + ((((v)&0xff00000000000000ULL) >> 56) | (((v)&0x00ff000000000000ULL) >> 40) | (((v)&0x0000ff0000000000ULL) >> 24) | \ + (((v)&0x000000ff00000000ULL) >> 8) | (((v)&0x00000000ff000000ULL) << 8) | (((v)&0x0000000000ff0000ULL) << 24) | \ + (((v)&0x000000000000ff00ULL) << 40) | (((v)&0x00000000000000ffULL) << 56)) #endif #ifndef reverse_order_32 #define reverse_order_32(v) \ - ((((v) & 0xff000000) >> 24) | (((v) & 0x00ff0000) >> 8) | (((v) & 0x0000ff00) << 8) | (((v) & 0x000000ff) << 24)) + ((((v)&0xff000000) >> 24) | (((v)&0x00ff0000) >> 8) | (((v)&0x0000ff00) << 8) | (((v)&0x000000ff) << 24)) #endif #ifndef reverse_order_16 -#define reverse_order_16(v) ((((v) & 0xff00) >> 8) | (((v) & 0x00ff) << 8)) +#define reverse_order_16(v) ((((v)&0xff00) >> 8) | (((v)&0x00ff) << 8)) #endif #if defined(_LITTLE_ENDIAN)