aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2021-08-19 19:25:47 +0200
committerneels <nhofmeyr@sysmocom.de>2021-08-27 07:02:47 +0000
commitfaf37254eb0a2b4b8d52e787f407ea7843031654 (patch)
treea10ca64e043e3616e15079121bca5cb1b302c7f6
parent0f34f7e72f255da9ade48db60d591bf399640d95 (diff)
stat_item desc: add explicit indexes for clarity
Add explicit indexes like [BSC_STAT_NUM_BTS_TOTAL] = { ... BSC_STAT_NUM_BTS_TOTAL == 0 and the first item of bsc_stat_desc of course has index 0, but when grepping the code, it looks like BSC_STAT_NUM_BTS_TOTAL is missing a name definition. Same for MSC_STAT_MSC_LINKS_ACTIVE and MSC_STAT_MSC_LINKS_TOTAL. Related: SYS#5542 Change-Id: Ie47e0857c41d517a9b37be96f6669d1825d24a6d
-rw-r--r--src/osmo-bsc/bsc_init.c2
-rw-r--r--src/osmo-bsc/osmo_bsc_msc.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/osmo-bsc/bsc_init.c b/src/osmo-bsc/bsc_init.c
index 24596f4eb..42acbbc4e 100644
--- a/src/osmo-bsc/bsc_init.c
+++ b/src/osmo-bsc/bsc_init.c
@@ -47,7 +47,7 @@
#include <stdbool.h>
static const struct osmo_stat_item_desc bsc_stat_desc[] = {
- { "num_bts:total", "Number of configured BTS for this BSC", "", 16, 0 },
+ [BSC_STAT_NUM_BTS_TOTAL] = { "num_bts:total", "Number of configured BTS for this BSC", "", 16, 0 },
};
static const struct osmo_stat_item_group_desc bsc_statg_desc = {
diff --git a/src/osmo-bsc/osmo_bsc_msc.c b/src/osmo-bsc/osmo_bsc_msc.c
index 772bea588..a80ee64db 100644
--- a/src/osmo-bsc/osmo_bsc_msc.c
+++ b/src/osmo-bsc/osmo_bsc_msc.c
@@ -147,8 +147,8 @@ static const struct rate_ctr_group_desc msc_ctrg_desc = {
};
static const struct osmo_stat_item_desc msc_stat_desc[] = {
- { "msc_links:active", "Number of active MSC links", "", 16, 0 },
- { "msc_links:total", "Number of configured MSC links", "", 16, 0 },
+ [MSC_STAT_MSC_LINKS_ACTIVE] = { "msc_links:active", "Number of active MSC links", "", 16, 0 },
+ [MSC_STAT_MSC_LINKS_TOTAL] = { "msc_links:total", "Number of configured MSC links", "", 16, 0 },
};
static const struct osmo_stat_item_group_desc msc_statg_desc = {