Skip to content

Commit

Permalink
Fixed syntax errors in bswap_64 (#8613)
Browse files Browse the repository at this point in the history
It looks like some syntax errors were introduced by mistake because some
left parentheses were changed to curly braces without the right parens
being changed accordingly. This fixes #8611.
  • Loading branch information
acozzette authored May 17, 2021
1 parent 652d99a commit 65abb64
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/google/protobuf/stubs/port.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,14 @@ static inline uint32 bswap_32(uint32 x) {

#ifndef bswap_64
static inline uint64 bswap_64(uint64 x) {
return (((x & uint64_t{0xFFu)) << 56) |
((x & uint64_t{0xFF00u)) << 40) |
((x & uint64_t{0xFF0000u)) << 24) |
((x & uint64_t{0xFF000000u)) << 8) |
((x & uint64_t{0xFF00000000u)) >> 8) |
((x & uint64_t{0xFF0000000000u)) >> 24) |
((x & uint64_t{0xFF000000000000u)) >> 40) |
((x & uint64_t{0xFF00000000000000u)) >> 56));
return (((x & uint64_t{0xFFu}) << 56) |
((x & uint64_t{0xFF00u}) << 40) |
((x & uint64_t{0xFF0000u}) << 24) |
((x & uint64_t{0xFF000000u}) << 8) |
((x & uint64_t{0xFF00000000u}) >> 8) |
((x & uint64_t{0xFF0000000000u}) >> 24) |
((x & uint64_t{0xFF000000000000u}) >> 40) |
((x & uint64_t{0xFF00000000000000u}) >> 56));
}
#define bswap_64(x) bswap_64(x)
#endif
Expand Down

0 comments on commit 65abb64

Please sign in to comment.