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 /driver_zodiac.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 'driver_zodiac.c')
-rw-r--r-- | driver_zodiac.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |