Browse Source

Endian conversion mistakenly done before fraction math; ok henning@

OPENBSD_3_6
alexander 20 years ago
parent
commit
59dafa077b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/usr.sbin/ntpd/util.c

+ 2
- 2
src/usr.sbin/ntpd/util.c View File

@ -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);
}

Loading…
Cancel
Save