aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vty/utils.c')
-rw-r--r--src/vty/utils.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vty/utils.c b/src/vty/utils.c
index 1137f2b5..4501c660 100644
--- a/src/vty/utils.c
+++ b/src/vty/utils.c
@@ -247,12 +247,11 @@ static int osmo_stat_item_handler(
{
struct vty_out_context *vctx = vctx_;
struct vty *vty = vctx->vty;
- const char *unit =
- item->desc->unit != OSMO_STAT_ITEM_NO_UNIT ?
- item->desc->unit : "";
+ const struct osmo_stat_item_desc *desc = osmo_stat_item_get_desc(item);
+ const char *unit = (desc->unit != OSMO_STAT_ITEM_NO_UNIT) ? desc->unit : "";
vty_out(vty, " %s%s: %8" PRIi32 " %s%s",
- vctx->prefix, item->desc->description,
+ vctx->prefix, desc->description,
osmo_stat_item_get_last(item),
unit, VTY_NEWLINE);