summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-12 16:56:49 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-12 18:24:39 -0500
commitdf9232c655921ed37083c9509940fdb52b8f70fa (patch)
tree4d20a940ef2b991d1b68304241607e8ca137425d /gpsd_json.c
parentcb75e02a7f2b1854f956e7fa0565dfc31c791dc9 (diff)
downloadgpsd-df9232c655921ed37083c9509940fdb52b8f70fa.tar.gz
Replace Gary's magic number 22 with TIMESPEC_LEN.
All regression tests pass.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index 8807ddce..0f25a8ac 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -187,7 +187,7 @@ void json_tpv_dump(const struct gps_device_t *session,
#ifdef PPS_ENABLE
/*@-type -formattype@*/ /* splint is confused about struct timespec */
if (session->ppscount)
- char ts_str[22]; /* buffer to hold printable timespec */
+ char ts_str[TIMESPEC_LEN]; /* buffer to hold printable timespec */
/* you can not use a double here as you will lose 11 bits
* of precision */
(void)timespec_str( &session->ppslast.clock, ts_str, sizeof(ts_str) );