summaryrefslogtreecommitdiffstats
path: root/src/Endianness.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-22 19:30:31 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-07-22 19:30:31 +0200
commit18a0b60c12daec4c04fd3cb9c4422e69de4fcbf2 (patch)
tree089b3be905aa030367925762c58bd30b08f5f3f6 /src/Endianness.h
parentMerge branch 'master' into saplingsandleaves (diff)
parentUpdated prefabs to current Gallery content. (diff)
downloadcuberite-18a0b60c12daec4c04fd3cb9c4422e69de4fcbf2.tar
cuberite-18a0b60c12daec4c04fd3cb9c4422e69de4fcbf2.tar.gz
cuberite-18a0b60c12daec4c04fd3cb9c4422e69de4fcbf2.tar.bz2
cuberite-18a0b60c12daec4c04fd3cb9c4422e69de4fcbf2.tar.lz
cuberite-18a0b60c12daec4c04fd3cb9c4422e69de4fcbf2.tar.xz
cuberite-18a0b60c12daec4c04fd3cb9c4422e69de4fcbf2.tar.zst
cuberite-18a0b60c12daec4c04fd3cb9c4422e69de4fcbf2.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;
}