From 4abdcf1ac9a891a5010f238214150adbc2073b38 Mon Sep 17 00:00:00 2001 From: Zbigniew Chyla Date: Fri, 16 Jan 2015 15:46:59 +0100 Subject: Add str_{,v}appendf, use it everywhere. This change doesn't affect generated binary code. --- libgps_sock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libgps_sock.c') 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'; -- cgit v1.2.1