summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-07-14 12:39:39 -0700
committerGary E. Miller <gem@rellim.com>2018-07-14 12:39:39 -0700
commit1744cd9f87006c85492edf1f476e054bdb744ea1 (patch)
tree4993465a4d5313cd99e7b8565c30ad84f2e4261b /gpsd.c
parent3e9392d364e1463f73f6249fd755f593e78bc3d3 (diff)
downloadgpsd-1744cd9f87006c85492edf1f476e054bdb744ea1.tar.gz
gpsd.c: isnan() -> isfinite()
Thanks to Virgin Orbit for their support on this patch.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsd.c b/gpsd.c
index 011b445d..5d57c81c 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -1268,7 +1268,7 @@ static void handle_request(struct subscriber_t *sub,
devconf.stopbits = device->gpsdata.dev.stopbits;
if (devconf.stopbits == DEVDEFAULT_STOPBITS)
devconf.stopbits = device->gpsdata.dev.stopbits;
- if (isnan(devconf.cycle))
+ if (0 != isfinite(devconf.cycle))
devconf.cycle = device->gpsdata.dev.cycle;
/* now that channel is selected, apply changes */
@@ -1555,7 +1555,7 @@ static void all_reports(struct gps_device_t *device, gps_mask_t changed)
/* many GPS spew random times until a valid GPS fix */
/* allow override with -r optin */
//gpsd_log(&context.errout, LOG_PROG, "NTP: no fix\n");
- } else if (isnan(device->newdata.time)) {
+ } else if (0 != isfinite(device->newdata.time)) {
//gpsd_log(&context.errout, LOG_PROG, "NTP: bad new time\n");
#if defined(PPS_ENABLE)
} else if (device->newdata.time <= device->pps_thread.fix_in.real.tv_sec) {