diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-02-09 19:19:29 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-02-09 19:19:29 -0500 |
commit | 5b4af8cc002773058ad744f9c2f9975284b09224 (patch) | |
tree | eb8d17794438906756031692e45112bd6e215f4e /monitor_sirf.c | |
parent | 2c9e5b2eb52fb2d6eee3f8fc50ee916e68ee017a (diff) | |
download | gpsd-5b4af8cc002773058ad744f9c2f9975284b09224.tar.gz |
cppcheck and Coverity cleanup; all regression tests pass.
Diffstat (limited to 'monitor_sirf.c')
-rw-r--r-- | monitor_sirf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/monitor_sirf.c b/monitor_sirf.c index f99a85ac..b4a59608 100644 --- a/monitor_sirf.c +++ b/monitor_sirf.c @@ -593,13 +593,13 @@ static void sirf_update(void) if (pps_thread_lastpps(&session, &drift) > 0) { /* NOTE: can not use double here due to precision requirements */ struct timespec timedelta; - char buf2[22]; TS_SUB( &timedelta, &drift.clock, &drift.real); if ( 86400 < (long)labs(timedelta.tv_sec) ) { /* more than one day off, overflow */ /* need a bigger field to show it */ (void)mvwprintw(mid7win, 2, 39, "> 1 day"); } else { + char buf2[22]; (void)timespec_str( &timedelta, buf2, sizeof(buf2) ); (void)mvwprintw(mid7win, 4, 39, "%s", buf2); } |