diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-12-20 04:10:08 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-12-20 04:10:08 -0500 |
commit | 07d0ac7220b760dc78eac593f73a508a23bbad71 (patch) | |
tree | 0d2cd82e0cb1d42c9d05f4fded39a3f1fa55e834 /driver_nmea.c | |
parent | 9d7a9477ed66cceab9b9f5acc7eb4e0d1127136b (diff) | |
download | gpsd-07d0ac7220b760dc78eac593f73a508a23bbad71.tar.gz |
Be more explicit about an assumption. All regression tests pass.
Diffstat (limited to 'driver_nmea.c')
-rw-r--r-- | driver_nmea.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/driver_nmea.c b/driver_nmea.c index 14345711..2f8b777c 100644 --- a/driver_nmea.c +++ b/driver_nmea.c @@ -687,12 +687,9 @@ static gps_mask_t processGPZDA(int c UNUSED, char *field[], */ gpsd_report(LOG_WARN, "century rollover detected.\n"); session->context->century = century; - } else if (century < session->context->century) { + } else if (session->context->start_time >= GPS_EPOCH && century < session->context->century) { /* - * This looks like a GPS week-counter rollover. Hidden - * assumption in the above test is that a bogus (small positive - * or negative) system clock value will always fail the - * above guard and thus never trigger this error message. + * This looks like a GPS week-counter rollover. */ gpsd_report(LOG_WARN, "ZDA year %d less than clock year, " "probable GPS week rollover lossage\n", year); |