aboutsummaryrefslogtreecommitdiffstats
path: root/com32/include/netinet/in.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:22 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-05-29 15:10:22 -0700
commit61a0ccaee3fb5d7fa8068a83f19fa7684f8b67b3 (patch)
treea4eb2193a80e2dc73954c95fb7c63eb7dfb769bf /com32/include/netinet/in.h
parent53a8cea5d47f184d71df0975fa0e9c4aa9208439 (diff)
downloadsyslinux-61a0ccaee3fb5d7fa8068a83f19fa7684f8b67b3.tar.gz
syslinux-61a0ccaee3fb5d7fa8068a83f19fa7684f8b67b3.tar.xz
syslinux-61a0ccaee3fb5d7fa8068a83f19fa7684f8b67b3.zip
Run Nindent on com32/include/netinet/in.h
Automatically reformat com32/include/netinet/in.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/include/netinet/in.h')
-rw-r--r--com32/include/netinet/in.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/com32/include/netinet/in.h b/com32/include/netinet/in.h
index 5fd71a6a..051cc08f 100644
--- a/com32/include/netinet/in.h
+++ b/com32/include/netinet/in.h
@@ -7,7 +7,7 @@
static inline uint16_t __htons(uint16_t v)
{
- return ((v) << 8) | ((v) >> 8);
+ return ((v) << 8) | ((v) >> 8);
}
#define htons(x) __htons(x)
@@ -15,15 +15,14 @@ static inline uint16_t __htons(uint16_t v)
static inline uint32_t __htonl(uint32_t v)
{
- if ( __builtin_constant_p(v) ) {
- return (((v) & 0x000000ff) << 24) |
- (((v) & 0x0000ff00) << 8) |
- (((v) & 0x00ff0000) >> 8) |
- (((v) & 0xff000000) >> 24);
- } else {
- asm("xchgb %h0,%b0 ; roll $16,%0 ; xchgb %h0,%b0" : "+abcd" (v));
- return v;
- }
+ if (__builtin_constant_p(v)) {
+ return (((v) & 0x000000ff) << 24) |
+ (((v) & 0x0000ff00) << 8) |
+ (((v) & 0x00ff0000) >> 8) | (((v) & 0xff000000) >> 24);
+ } else {
+asm("xchgb %h0,%b0 ; roll $16,%0 ; xchgb %h0,%b0":"+abcd"(v));
+ return v;
+ }
}
#define htonl(x) __htonl(x)
@@ -31,7 +30,7 @@ static inline uint32_t __htonl(uint32_t v)
static inline uint64_t __htonq(uint64_t v)
{
- return ((uint64_t) __htonl(v) << 32) | __htonl(v >> 32);
+ return ((uint64_t) __htonl(v) << 32) | __htonl(v >> 32);
}
#define htonq(x) __htonq(x)
@@ -41,7 +40,7 @@ typedef uint32_t in_addr_t;
typedef uint16_t in_port_t;
struct in_addr {
- in_addr_t s_addr;
+ in_addr_t s_addr;
};
#endif /* _NETINET_IN_H */