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. --- driver_zodiac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'driver_zodiac.c') diff --git a/driver_zodiac.c b/driver_zodiac.c index e23ef7b2..b712503e 100644 --- a/driver_zodiac.c +++ b/driver_zodiac.c @@ -19,6 +19,7 @@ #include "gpsd.h" #include "bits.h" +#include "strfuncs.h" /* Zodiac protocol description uses 1-origin indexing by little-endian word */ #define get16z(buf, n) ( (buf[2*(n)-2]) \ @@ -95,8 +96,7 @@ static ssize_t zodiac_spew(struct gps_device_t *session, unsigned short type, "%04x %04x %04x %04x %04x", h.sync, h.id, h.ndata, h.flags, h.csum); for (i = 0; i < dlen; i++) - (void)snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), - " %04x", dat[i]); + str_appendf(buf, sizeof(buf), " %04x", dat[i]); gpsd_report(&session->context->errout, LOG_RAW, "Sent Zodiac packet: %s\n", buf); -- cgit v1.2.1