summaryrefslogtreecommitdiff
path: root/libgps_sock.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 /libgps_sock.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 'libgps_sock.c')
-rw-r--r--libgps_sock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libgps_sock.c b/libgps_sock.c
index 02164f62..95f8b84c 100644
--- a/libgps_sock.c
+++ b/libgps_sock.c
@@ -554,8 +554,7 @@ int gps_sock_stream(struct gps_data_t *gpsdata, unsigned int flags,
(void)strlcat(buf, "\"pps\":true,", sizeof(buf));
/*@-nullpass@*//* shouldn't be needed, splint has a bug */
if (flags & WATCH_DEVICE)
- (void)snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
- "\"device\":\"%s\",", (char *)d);
+ str_appendf(buf, sizeof(buf), "\"device\":\"%s\",", (char *)d);
/*@+nullpass@*/
if (buf[strlen(buf) - 1] == ',')
buf[strlen(buf) - 1] = '\0';