From fce37f463d439a49dfd039b3aa1d30c8afe7b0ed Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 21 May 2012 15:32:31 -0400 Subject: Appease splint, which can't parse declarations after executable code. --- gpsdecode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gpsdecode.c') diff --git a/gpsdecode.c b/gpsdecode.c index 412c9ed4..60060b72 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -45,6 +45,7 @@ void gpsd_report(int errlevel, const char *fmt, ...) #ifdef AIVDM_ENABLE static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen) { + bool imo = false; (void)snprintf(buf, buflen, "%u|%u|%09u|", ais->type, ais->repeat, ais->mmsi); /*@ -formatcode @*/ @@ -126,7 +127,6 @@ static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen) "%u|%u", ais->type8.dac, ais->type8.fid); - int imo = 0; switch(ais->type8.dac) { case 1: /* International */ switch(ais->type8.fid) { @@ -169,12 +169,12 @@ static void aivdm_csv_dump(struct ais_t *ais, char *buf, size_t buflen) ais->type8.dac1fid11.preciptype, ais->type8.dac1fid11.salinity, ais->type8.dac1fid11.ice); - imo = 1; + imo = true; break; } break; } - if (imo == 0) + if (!imo) (void)snprintf(buf + strlen(buf), buflen - strlen(buf), "|%zd:%s", ais->type8.bitcount, -- cgit v1.2.1