Fix IEEE754 conversion

It seems that the endianness handling was broken in
ef6c4be655c ("Safer IEEE754 conversion."). So drop it.
This commit is contained in:
Stefan Wahren 2016-04-01 18:19:32 +00:00
parent 78298bc68e
commit 9906723447

View File

@ -12,7 +12,6 @@
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <arpa/inet.h>
#include "mbus-protocol.h" #include "mbus-protocol.h"
@ -691,7 +690,6 @@ mbus_data_float_decode(unsigned char *float_data)
float f; float f;
} data; } data;
memcpy(&(data.u32), float_data, sizeof(uint32_t)); memcpy(&(data.u32), float_data, sizeof(uint32_t));
data.u32 = ntohl(data.u32);
return data.f; return data.f;
} }
#endif #endif