diff options
author | Zbigniew Chyla <zbigniew.chyla@nokia.com> | 2015-03-22 21:51:45 +0200 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-22 16:07:28 -0400 |
commit | 1c01dbfdf170e9eb32b891897e9792cf316ebd87 (patch) | |
tree | 00c524733ec61f47855aaab17be4967df90ae13d /gpsd_json.c | |
parent | fcb8bba28414daa6dd73809b1af31d571dcc9160 (diff) | |
download | gpsd-1c01dbfdf170e9eb32b891897e9792cf316ebd87.tar.gz |
Fix incorrect arguments in NITEMS macro calls
Diffstat (limited to 'gpsd_json.c')
-rw-r--r-- | gpsd_json.c | 4 |
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)", |