gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH] Fix format string.


From: Beat Bolli
Subject: [gpsd-dev] [PATCH] Fix format string.
Date: Sat, 10 Dec 2016 14:30:42 +0100

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 <address@hidden>
---
 timehint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/timehint.c b/timehint.c
index af74c13..3ca0312 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);
-- 
2.7.2



reply via email to

[Prev in Thread] Current Thread [Next in Thread]