summaryrefslogtreecommitdiff
path: root/ntpshm.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2013-10-16 18:46:39 -0700
committerGary E. Miller <gem@rellim.com>2013-10-16 18:46:39 -0700
commit0a876d5c5a47c98612956913517df99e4c3410cc (patch)
tree231c3c68ffa0a2022209bfe9957f8f06a2dd99ea /ntpshm.c
parentcb05b1122d2dfb9278ff28ebef2a5c65376ee18b (diff)
downloadgpsd-0a876d5c5a47c98612956913517df99e4c3410cc.tar.gz
Fix a bug where KPPS values were getting stepped on.
Diffstat (limited to 'ntpshm.c')
-rw-r--r--ntpshm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ntpshm.c b/ntpshm.c
index 8a8f0ba6..00d6d321 100644
--- a/ntpshm.c
+++ b/ntpshm.c
@@ -689,6 +689,9 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
#endif
/*@+noeffect@*/
+ /* ok and log used by KPPS and TIOMCWAIT */
+ ok = false;
+ log = NULL;
#if defined(HAVE_SYS_TIMEPPS_H)
if ( 0 <= session->kernelpps_handle ) {
struct timespec kernelpps_tv;
@@ -748,8 +751,6 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg)
#endif /* HAVE_SYS_TIMEPPS_H */
#if defined(TIOCMIWAIT)
- ok = false; /* FIXME, this steps on ok = TRUE just above */
- log = NULL;
/*@ +ignoresigns */
if (ioctl(session->gpsdata.gps_fd, TIOCMGET, &state) != 0) {