summaryrefslogtreecommitdiff
path: root/ntpshm.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2009-11-15 02:53:25 +0000
committerGary E. Miller <gem@rellim.com>2009-11-15 02:53:25 +0000
commitda13634ab454414a8c6ddfac55457fdef60600b9 (patch)
tree3b65b2c85ea09f516664aae27e820aa2c56c14ba /ntpshm.c
parentcc34f4c5022035e0f469b8f24549d0f05de7f086 (diff)
downloadgpsd-da13634ab454414a8c6ddfac55457fdef60600b9.tar.gz
Shut up splint. Per Hakan Johansson.
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 9102bde9..4b715b77 100644
--- a/ntpshm.c
+++ b/ntpshm.c
@@ -175,7 +175,7 @@ int ntpshm_pps(struct gps_device_t *session, struct timeval *tv)
struct shmTime *shmTime = NULL, *shmTimeP = NULL;
time_t seconds;
/* FIXME, microseconds needs to be set for 5Hz PPS */
- unsigned long microseconds = 0;
+ time_t microseconds = 0;
double offset;
long l_offset;
@@ -205,7 +205,8 @@ int ntpshm_pps(struct gps_device_t *session, struct timeval *tv)
}
seconds = shmTime->clockTimeStampSec + 1;
- offset = fabs(((tv->tv_sec - seconds) + (tv->tv_usec - 0) / 1000000.0));
+ offset = fabs((tv->tv_sec - seconds)
+ +((double)(tv->tv_usec - 0)/1000000.0));
/* we use the shmTime mode 1 protocol