summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-10-02 22:10:53 -0400
committerEric S. Raymond <esr@thyrsus.com>2013-10-02 22:10:53 -0400
commit73352206caf3e3dc9881e5e2bf788076653c4fce (patch)
tree7c5b5b3b00a4114249eb8dfd106f08b9c5aebc7d /gpsd_json.c
parent0c5f6290709082d02c5877b9efa316c66fae7849 (diff)
downloadgpsd-73352206caf3e3dc9881e5e2bf788076653c4fce.tar.gz
splint cleanup.
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index 26b18277..1216e24c 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -1651,6 +1651,17 @@ void json_aivdm_dump(const struct ais_t *ais,
"N/A",
};
+ const char *position_types[8] = {
+ "Not available",
+ "Port-side to",
+ "Starboard-side to",
+ "Mediterranean (end-on) mooring",
+ "Mooring buoy",
+ "Anchorage",
+ "Reserved for future use",
+ "Reserved for future use",
+ };
+
(void)snprintf(buf, buflen, "{\"class\":\"AIS\",");
if (device != NULL && device[0] != '\0')
(void)snprintf(buf + strlen(buf), buflen - strlen(buf),
@@ -1954,16 +1965,6 @@ void json_aivdm_dump(const struct ais_t *ais,
}
else if (ais->type6.dac == 1)
switch (ais->type6.fid) {
- const char *position_types[8] = {
- "Not available",
- "Port-side to",
- "Starboard-side to",
- "Mediterranean (end-on) mooring",
- "Mooring buoy",
- "Anchorage",
- "Reserved for future use",
- "Reserved for future use",
- };
case 12: /* IMO236 -Dangerous cargo indication */
/* some fields have beem merged to an ISO8601 partial date */
(void)snprintf(buf + strlen(buf), buflen - strlen(buf),