diff options
author | Alexander Guy <alexander@cvs.openbsd.org> | 2004-07-07 07:16:17 +0000 |
---|---|---|
committer | Alexander Guy <alexander@cvs.openbsd.org> | 2004-07-07 07:16:17 +0000 |
commit | a3d11b2a3cd27f4514d2ca0027d29e93924b6e37 (patch) | |
tree | 55c492e34c829619a3ff9f8841687eaaa1880666 /usr.sbin | |
parent | 4227cf868d9e5ad5b5fcb7a44634bddd6541312e (diff) |
Endian conversion mistakenly done before fraction math; ok henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ntpd/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ntpd/util.c b/usr.sbin/ntpd/util.c index ba44545aae8..e218aea573a 100644 --- a/usr.sbin/ntpd/util.c +++ b/usr.sbin/ntpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.4 2004/07/05 19:53:21 otto Exp $ */ +/* $OpenBSD: util.c,v 1.5 2004/07/07 07:16:16 alexander Exp $ */ /* * Copyright (c) 2004 Alexander Guy <alexander.guy@andern.org> @@ -58,7 +58,7 @@ d_to_lfp(double d) struct l_fixedpt lfp; lfp.int_part = htonl(d); - lfp.fraction = htonl((d - lfp.int_part) * UINT_MAX); + lfp.fraction = htonl((d - (u_int32_t)d) * UINT_MAX); return (lfp); } |