diff options
author | Zbigniew Chyla <zbigniew.chyla@nsn.com> | 2015-01-16 15:46:59 +0100 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-01-21 10:47:26 -0500 |
commit | 4abdcf1ac9a891a5010f238214150adbc2073b38 (patch) | |
tree | ccd55b9a74504246569a0d84d7853370541cad34 /json.c | |
parent | b500289f7af867ee5d5c236247f8f8a2a48ad342 (diff) | |
download | gpsd-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |