summaryrefslogtreecommitdiff
path: root/gpsdecode.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-05-21 15:32:31 -0400
committerEric S. Raymond <esr@thyrsus.com>2012-05-21 15:42:18 -0400
commitfce37f463d439a49dfd039b3aa1d30c8afe7b0ed (patch)
tree2cdbf9f4d0860b1278f6aee53b30002cf69719c6 /gpsdecode.c
parent77c20949bd4383d22b1ff1fb52389478ecfbd7ae (diff)
downloadgpsd-fce37f463d439a49dfd039b3aa1d30c8afe7b0ed.tar.gz
Appease splint, which can't parse declarations after executable code.
Diffstat (limited to 'gpsdecode.c')
-rw-r--r--gpsdecode.c6
1 files changed, 3 insertions, 3 deletions
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,