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

Unified Diff: fusl/src/network/inet_legacy.c

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/src/network/inet_legacy.c
diff --git a/fusl/src/network/inet_legacy.c b/fusl/src/network/inet_legacy.c
index 621b47b05086d98843a71b6b2a4589ef9238fb17..8ff40f381c5f2e5dbbd53f48e2412429461b7224 100644
--- a/fusl/src/network/inet_legacy.c
+++ b/fusl/src/network/inet_legacy.c
@@ -2,31 +2,34 @@
#include <netinet/in.h>
#include <arpa/inet.h>
-in_addr_t inet_network(const char *p)
-{
- return ntohl(inet_addr(p));
+in_addr_t inet_network(const char* p) {
+ return ntohl(inet_addr(p));
}
-struct in_addr inet_makeaddr(in_addr_t n, in_addr_t h)
-{
- if (n < 256) h |= n<<24;
- else if (n < 65536) h |= n<<16;
- else h |= n<<8;
- return (struct in_addr){ h };
+struct in_addr inet_makeaddr(in_addr_t n, in_addr_t h) {
+ if (n < 256)
+ h |= n << 24;
+ else if (n < 65536)
+ h |= n << 16;
+ else
+ h |= n << 8;
+ return (struct in_addr){h};
}
-in_addr_t inet_lnaof(struct in_addr in)
-{
- uint32_t h = in.s_addr;
- if (h>>24 < 128) return h & 0xffffff;
- if (h>>24 < 192) return h & 0xffff;
- return h & 0xff;
+in_addr_t inet_lnaof(struct in_addr in) {
+ uint32_t h = in.s_addr;
+ if (h >> 24 < 128)
+ return h & 0xffffff;
+ if (h >> 24 < 192)
+ return h & 0xffff;
+ return h & 0xff;
}
-in_addr_t inet_netof(struct in_addr in)
-{
- uint32_t h = in.s_addr;
- if (h>>24 < 128) return h >> 24;
- if (h>>24 < 192) return h >> 16;
- return h >> 8;
+in_addr_t inet_netof(struct in_addr in) {
+ uint32_t h = in.s_addr;
+ if (h >> 24 < 128)
+ return h >> 24;
+ if (h >> 24 < 192)
+ return h >> 16;
+ return h >> 8;
}

Powered by Google App Engine
This is Rietveld 408576698