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

Unified Diff: fusl/include/endian.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/endian.h
diff --git a/fusl/include/endian.h b/fusl/include/endian.h
index 8597009221f381a5a72ebe8e22248e0c193d8c82..eab27c44418e03fbd20ccb81317d3ec7db04853c 100644
--- a/fusl/include/endian.h
+++ b/fusl/include/endian.h
@@ -22,19 +22,17 @@
#include <stdint.h>
-static __inline uint16_t __bswap16(uint16_t __x)
-{
- return __x<<8 | __x>>8;
+static __inline uint16_t __bswap16(uint16_t __x) {
+ return __x << 8 | __x >> 8;
}
-static __inline uint32_t __bswap32(uint32_t __x)
-{
- return __x>>24 | ((__x>>8)&0xff00) | ((__x<<8)&0xff0000) | __x<<24;
+static __inline uint32_t __bswap32(uint32_t __x) {
+ return __x >> 24 | ((__x >> 8) & 0xff00) | ((__x << 8) & 0xff0000) |
+ __x << 24;
}
-static __inline uint64_t __bswap64(uint64_t __x)
-{
- return ((uint64_t)__bswap32(__x))<<32 | __bswap32(__x>>32);
+static __inline uint64_t __bswap64(uint64_t __x) {
+ return ((uint64_t)__bswap32(__x)) << 32 | __bswap32(__x >> 32);
}
#if __BYTE_ORDER == __LITTLE_ENDIAN
« fusl/arch/aarch64/atomic_arch.h ('K') | « fusl/include/elf.h ('k') | fusl/include/err.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698