diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-03-10 04:51:49 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-03-10 04:51:49 -0500 |
commit | c56017271ca1d53b5f45e5dcff551fed8e3e29be (patch) | |
tree | e1f11e710c1825460363d26dacd2ed4f5cca22d1 /driver_sirf.c | |
parent | 6a89bcea2a29d70d864de82879d4df8e10fce61e (diff) | |
download | gpsd-c56017271ca1d53b5f45e5dcff551fed8e3e29be.tar.gz |
Yet more double->timestamp_t moves.
All tests pass. These are didfficult to spot because the compiler actually
doesn't care about the distinction btween the source and result type of
a typedef.
Diffstat (limited to 'driver_sirf.c')
-rw-r--r-- | driver_sirf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/driver_sirf.c b/driver_sirf.c index cee3b141..97f7ea06 100644 --- a/driver_sirf.c +++ b/driver_sirf.c @@ -778,7 +778,7 @@ static gps_mask_t sirf_msg_geodetic(struct gps_device_t *session, unpacked_date.tm_sec = 0; subseconds = getbeu16(buf, 17) * 1e-3; /*@ -compdef -unrecog */ - session->newdata.time = (double)timegm(&unpacked_date) + subseconds; + session->newdata.time = (timestamp_t)timegm(&unpacked_date) + subseconds; /*@ +compdef +unrecog */ gpsd_report(LOG_PROG, "SiRF: GND 0x29 UTC: %lf\n", session->newdata.time); @@ -900,7 +900,7 @@ static gps_mask_t sirf_msg_ublox(struct gps_device_t *session, unpacked_date.tm_sec = 0; subseconds = ((unsigned short)getbeu16(buf, 32)) * 1e-3; /*@ -compdef */ - session->newdata.time = (double)mkgmtime(&unpacked_date) + subseconds; + session->newdata.time = (timestamp_t)mkgmtime(&unpacked_date) + subseconds; /*@ +compdef */ #ifdef NTPSHM_ENABLE if (0 == (session->driver.sirf.time_seen & TIME_SEEN_UTC_2)) { @@ -952,7 +952,7 @@ static gps_mask_t sirf_msg_ppstime(struct gps_device_t *session, unpacked_date.tm_mon = (int)getub(buf, 5) - 1; unpacked_date.tm_year = (int)getbeu16(buf, 6) - 1900; /*@ -compdef */ - session->newdata.time = (double)mkgmtime(&unpacked_date); + session->newdata.time = (timestamp_t)mkgmtime(&unpacked_date); /*@ +compdef */ session->context->leap_seconds = (int)getbeu16(buf, 8); session->context->valid |= LEAP_SECOND_VALID; |