summaryrefslogtreecommitdiff
path: root/json.c
diff options
context:
space:
mode:
authorZbigniew Chyla <zbigniew.chyla@nsn.com>2015-01-16 15:46:59 +0100
committerEric S. Raymond <esr@thyrsus.com>2015-01-21 10:47:26 -0500
commit4abdcf1ac9a891a5010f238214150adbc2073b38 (patch)
treeccd55b9a74504246569a0d84d7853370541cad34 /json.c
parentb500289f7af867ee5d5c236247f8f8a2a48ad342 (diff)
downloadgpsd-4abdcf1ac9a891a5010f238214150adbc2073b38.tar.gz
Add str_{,v}appendf, use it everywhere.
This change doesn't affect generated binary code.
Diffstat (limited to 'json.c')
-rw-r--r--json.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/json.c b/json.c
index 4ba5173e..7fb86560 100644
--- a/json.c
+++ b/json.c
@@ -74,6 +74,7 @@ PERMISSIONS
#include "json.h"
#include "gps.h" /* for safe_atof() & timestamp_t prototype */
+#include "strfuncs.h"
#define JSON_MINIMAL /* GPSD only uses a subset of the features */
@@ -97,8 +98,7 @@ static void json_trace(int errlevel, const char *fmt, ...)
(void)strlcpy(buf, "json: ", sizeof(buf));
va_start(ap, fmt);
- (void)vsnprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), fmt,
- ap);
+ str_vappendf(buf, sizeof(buf), fmt, ap);
va_end(ap);
(void)fputs(buf, debugfp);