Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/ntp/dist/ntpd Use labs for long arguments and f...
details: https://anonhg.NetBSD.org/src/rev/fd4227921f10
branches: trunk
changeset: 327120:fd4227921f10
user: joerg <joerg%NetBSD.org@localhost>
date: Thu Feb 27 18:11:41 2014 +0000
description:
Use labs for long arguments and fabs for double ones.
diffstat:
external/bsd/ntp/dist/ntpd/refclock_wwv.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (35 lines):
diff -r 5576a4263453 -r fd4227921f10 external/bsd/ntp/dist/ntpd/refclock_wwv.c
--- a/external/bsd/ntp/dist/ntpd/refclock_wwv.c Thu Feb 27 18:11:08 2014 +0000
+++ b/external/bsd/ntp/dist/ntpd/refclock_wwv.c Thu Feb 27 18:11:41 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refclock_wwv.c,v 1.1.1.2 2013/12/27 23:30:52 christos Exp $ */
+/* $NetBSD: refclock_wwv.c,v 1.2 2014/02/27 18:11:41 joerg Exp $ */
/*
* refclock_wwv - clock driver for NIST WWV/H time/frequency station
@@ -1340,7 +1340,7 @@
if (sp->reach & (1 << AMAX))
sp->count--;
if (sp->synmax > ATHR && sp->synsnr > ASNR) {
- if (abs(epoch) < AWND * MS) {
+ if (labs(epoch) < AWND * MS) {
sp->reach |= 1;
sp->count++;
sp->mepoch = sp->lastpos = sp->pos;
@@ -1542,14 +1542,14 @@
*/
dtemp = (mepoch - zepoch) % WWV_SEC;
if (up->status & FGATE) {
- if (abs(dtemp) < MAXFREQ * MINAVG) {
+ if (fabs(dtemp) < MAXFREQ * MINAVG) {
up->freq += (dtemp / 2.) / ((mcount - zcount) *
FCONST);
if (up->freq > MAXFREQ)
up->freq = MAXFREQ;
else if (up->freq < -MAXFREQ)
up->freq = -MAXFREQ;
- if (abs(dtemp) < MAXFREQ * MINAVG / 2.) {
+ if (fabs(dtemp) < MAXFREQ * MINAVG / 2.) {
if (avginc < 3) {
avginc++;
} else {
Home |
Main Index |
Thread Index |
Old Index