diff options
author | Gary E. Miller <gem@rellim.com> | 2009-11-15 02:53:25 +0000 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2009-11-15 02:53:25 +0000 |
commit | da13634ab454414a8c6ddfac55457fdef60600b9 (patch) | |
tree | 3b65b2c85ea09f516664aae27e820aa2c56c14ba /ntpshm.c | |
parent | cc34f4c5022035e0f469b8f24549d0f05de7f086 (diff) | |
download | gpsd-da13634ab454414a8c6ddfac55457fdef60600b9.tar.gz |
Shut up splint. Per Hakan Johansson.
Diffstat (limited to 'ntpshm.c')
-rw-r--r-- | ntpshm.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |