From 93d29555e58df172bafba530afbc593c16ec66a3 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Mon, 21 Jul 2014 15:19:48 +0200 Subject: Style: Normalized to no spaces before closing parenthesis. --- src/Endianness.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Endianness.h') diff --git a/src/Endianness.h b/src/Endianness.h index 78f9a5d99..5997086e0 100644 --- a/src/Endianness.h +++ b/src/Endianness.h @@ -11,8 +11,8 @@ inline UInt64 HostToNetwork8(const void * a_Value) { unsigned long long __HostToNetwork8; - memcpy( &__HostToNetwork8, a_Value, sizeof( __HostToNetwork8 ) ); - __HostToNetwork8 = (( ( (unsigned long long)htonl((u_long)__HostToNetwork8) ) << 32) + htonl(__HostToNetwork8 >> 32)); + memcpy( &__HostToNetwork8, a_Value, sizeof( __HostToNetwork8)); + __HostToNetwork8 = (( ( (unsigned long long)htonl((u_long)__HostToNetwork8)) << 32) + htonl(__HostToNetwork8 >> 32)); return __HostToNetwork8; } @@ -20,11 +20,11 @@ inline UInt64 HostToNetwork8(const void * a_Value) -inline UInt32 HostToNetwork4(const void* a_Value ) +inline UInt32 HostToNetwork4(const void* a_Value) { unsigned int __HostToNetwork4; - memcpy( &__HostToNetwork4, a_Value, sizeof( __HostToNetwork4 ) ); - __HostToNetwork4 = ntohl( __HostToNetwork4 ); + memcpy( &__HostToNetwork4, a_Value, sizeof( __HostToNetwork4)); + __HostToNetwork4 = ntohl( __HostToNetwork4); return __HostToNetwork4; } -- cgit v1.2.3 From 1595ef73dcd6f6a525744185bd24343c3f8050c8 Mon Sep 17 00:00:00 2001 From: archshift Date: Sat, 26 Jul 2014 03:42:42 -0700 Subject: Endianness.h: undefined ntohll before redefining --- src/Endianness.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/Endianness.h') diff --git a/src/Endianness.h b/src/Endianness.h index 5997086e0..9aeb44986 100644 --- a/src/Endianness.h +++ b/src/Endianness.h @@ -1,6 +1,7 @@ #pragma once +#undef ntohll #define ntohll(x) ((((UInt64)ntohl((u_long)x)) << 32) + ntohl(x >> 32)) -- cgit v1.2.3