Skip to content

Commit

Permalink
CLang format
Browse files Browse the repository at this point in the history
  • Loading branch information
szmyd committed Nov 10, 2023
1 parent 0685dca commit c863821
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/lib/mesg_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 >
Expand Down
4 changes: 2 additions & 2 deletions src/tests/jungle_logstore/crc32.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 5 additions & 6 deletions src/tests/jungle_logstore/endian_encode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c863821

Please sign in to comment.