Move NTP_int32 conversion functions to util.c

This commit is contained in:
Miroslav Lichvar
2013-06-05 12:49:12 +02:00
parent d46e2a69a1
commit 2ceb3c89ca
6 changed files with 29 additions and 28 deletions

18
ntp.h
View File

@@ -93,22 +93,4 @@ typedef union {
#define NTP_NORMAL_PACKET_SIZE offsetof(NTP_Packet, auth_keyid)
/* ================================================== */
inline static double
int32_to_double(NTP_int32 x)
{
return (double) ntohl(x) / 65536.0;
}
/* ================================================== */
inline static NTP_int32
double_to_int32(double x)
{
return htonl((NTP_int32)(0.5 + 65536.0 * x));
}
/* ================================================== */
#endif /* GOT_NTP_H */