Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1916)

Unified Diff: fusl/include/byteswap.h

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fusl/include/byteswap.h
diff --git a/fusl/include/byteswap.h b/fusl/include/byteswap.h
index b0b846f6425b109c5005a54bc37b4322c1a2088e..b3bdea917276f0f2189e2e0537764157d6f5d76d 100644
--- a/fusl/include/byteswap.h
+++ b/fusl/include/byteswap.h
@@ -4,19 +4,17 @@
#include <features.h>
#include <stdint.h>
-static __inline uint16_t __bswap_16(uint16_t __x)
-{
- return __x<<8 | __x>>8;
+static __inline uint16_t __bswap_16(uint16_t __x) {
+ return __x << 8 | __x >> 8;
}
-static __inline uint32_t __bswap_32(uint32_t __x)
-{
- return __x>>24 | ((__x>>8)&0xff00) | ((__x<<8)&0xff0000) | __x<<24;
+static __inline uint32_t __bswap_32(uint32_t __x) {
+ return __x >> 24 | ((__x >> 8) & 0xff00) | ((__x << 8) & 0xff0000) |
+ __x << 24;
}
-static __inline uint64_t __bswap_64(uint64_t __x)
-{
- return ((uint64_t)__bswap_32(__x))<<32 | __bswap_32(__x>>32);
+static __inline uint64_t __bswap_64(uint64_t __x) {
+ return ((uint64_t)__bswap_32(__x)) << 32 | __bswap_32(__x >> 32);
}
#define bswap_16(x) __bswap_16(x)

Powered by Google App Engine
This is Rietveld 408576698