summaryrefslogtreecommitdiff
path: root/timehint.c
diff options
context:
space:
mode:
authorBeat Bolli <dev@drbeat.li>2016-12-10 14:30:42 +0100
committerJon Schlueter <jon.schlueter@gmail.com>2016-12-11 09:24:18 -0500
commit2577b2e5de9370b117091a2c57a6adcdd81c003c (patch)
tree4eee86475945ee0dedc9eee735f68fa92abd3092 /timehint.c
parentba9957de60f8a2c9985e78933dec5a060d38b664 (diff)
downloadgpsd-2577b2e5de9370b117091a2c57a6adcdd81c003c.tar.gz
Fix format string.
149f329e ("ntpd uses precision as a floor, so do not be conservative.", 2016-10-10) changed the log output of "pps" or "clock" to the numeric precision without also updating the gpsd_log() format string, causing a SIGSEGV when running with -D4 or above. Signed-off-by: Beat Bolli <dev@drbeat.li>
Diffstat (limited to 'timehint.c')
-rw-r--r--timehint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/timehint.c b/timehint.c
index af74c13d..3ca03120 100644
--- a/timehint.c
+++ b/timehint.c
@@ -258,7 +258,7 @@ int ntpshm_put(struct gps_device_t *session, volatile struct shmTime *shmseg, st
timespec_str( &td->real, real_str, sizeof(real_str) );
timespec_str( &td->clock, clock_str, sizeof(clock_str) );
gpsd_log(&session->context->errout, LOG_PROG,
- "NTP: ntpshm_put(%s,%s) %s @ %s\n",
+ "NTP: ntpshm_put(%s,%d) %s @ %s\n",
session->gpsdata.dev.path,
precision,
real_str, clock_str);