diff options
author | Gary E. Miller <gem@rellim.com> | 2018-07-14 12:48:17 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2018-07-14 12:48:17 -0700 |
commit | 2603c2640509a3e85ef05bc5fb23613ad6595677 (patch) | |
tree | 5f949d8e3b3740df73bf811b17f81ec6a2038f6c /gpsmon.c | |
parent | 424385fcf7fea280ebd948b372c88ea87e33fd53 (diff) | |
download | gpsd-2603c2640509a3e85ef05bc5fb23613ad6595677.tar.gz |
gpsmon.c: isnan() -> isfinite(). Fix a buffer size.
Thanks to Virgin Orbit for their support on this patch.
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -425,7 +425,7 @@ void monitor_log(const char *fmt, ...) static const char *promptgen(void) { - static char buf[256]; + static char buf[sizeof(session.gpsdata.dev.path)]; if (serial) (void)snprintf(buf, sizeof(buf), @@ -858,7 +858,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED) #ifdef NTP_ENABLE /* Update the last fix time seen for PPS if we've actually seen one, * and it is a new second. */ - if ( 0 != isnan(device->newdata.time)) { + if ( 0 == isfinite(device->newdata.time)) { // "NTP: bad new time #if defined(PPS_ENABLE) } else if (device->newdata.time <= device->pps_thread.fix_in.real.tv_sec) { |