summaryrefslogtreecommitdiffstats
path: root/src/Endianness.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-21 15:19:48 +0200
committermadmaxoft <github@xoft.cz>2014-07-21 17:40:43 +0200
commit93d29555e58df172bafba530afbc593c16ec66a3 (patch)
tree681174bef875ffd821d7d87602f2063251f25673 /src/Endianness.h
parentStyle: Normalized spaces after if, for and while. (diff)
downloadcuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar.gz
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar.bz2
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar.lz
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar.xz
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.tar.zst
cuberite-93d29555e58df172bafba530afbc593c16ec66a3.zip
Diffstat (limited to 'src/Endianness.h')
-rw-r--r--src/Endianness.h10
1 files changed, 5 insertions, 5 deletions
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;
}