summaryrefslogtreecommitdiff
path: root/gpsd_json.c
diff options
context:
space:
mode:
authorZbigniew Chyla <zbigniew.chyla@nokia.com>2015-03-22 21:51:45 +0200
committerEric S. Raymond <esr@thyrsus.com>2015-03-22 16:07:28 -0400
commit1c01dbfdf170e9eb32b891897e9792cf316ebd87 (patch)
tree00c524733ec61f47855aaab17be4967df90ae13d /gpsd_json.c
parentfcb8bba28414daa6dd73809b1af31d571dcc9160 (diff)
downloadgpsd-1c01dbfdf170e9eb32b891897e9792cf316ebd87.tar.gz
Fix incorrect arguments in NITEMS macro calls
Diffstat (limited to 'gpsd_json.c')
-rw-r--r--gpsd_json.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsd_json.c b/gpsd_json.c
index 48c686e0..9d51b12d 100644
--- a/gpsd_json.c
+++ b/gpsd_json.c
@@ -1477,7 +1477,7 @@ void json_aivdm_dump(const struct ais_t *ais,
"Light Vessel / LANBY / Rigs",
};
-#define NAVAIDTYPE_DISPLAY(n) (((n) < (unsigned int)NITEMS(navaid_type_legends[0])) ? navaid_type_legends[n] : "INVALID NAVAID TYPE")
+#define NAVAIDTYPE_DISPLAY(n) (((n) < (unsigned int)NITEMS(navaid_type_legends)) ? navaid_type_legends[n] : "INVALID NAVAID TYPE")
// cppcheck-suppress variableScope
static const char *signal_legends[] = {
@@ -1498,7 +1498,7 @@ void json_aivdm_dump(const struct ais_t *ais,
"X = Vessels shall proceed only on direction.",
};
-#define SIGNAL_DISPLAY(n) (((n) < (unsigned int)NITEMS(signal_legends[0])) ? signal_legends[n] : "INVALID SIGNAL TYPE")
+#define SIGNAL_DISPLAY(n) (((n) < (unsigned int)NITEMS(signal_legends)) ? signal_legends[n] : "INVALID SIGNAL TYPE")
static const char *route_type[32] = {
"Undefined (default)",