From ac4ed17dbd15ed703583584626d820f66ea5a17d Mon Sep 17 00:00:00 2001 From: Jacob Erlbeck Date: Tue, 8 Dec 2015 10:29:16 +0100 Subject: [PATCH] stats: Add OSMO prefix to STAT_ITEM_NOVALUE_ID This symbol is globally visible and therefore should have an OSMO prefix like the other identifiers exported by stat_item.h. Sponsored-by: On-Waves ehf --- include/osmocom/core/stat_item.h | 2 +- src/stat_item.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/osmocom/core/stat_item.h b/include/osmocom/core/stat_item.h index b3a3d9c2b..181b029fc 100644 --- a/include/osmocom/core/stat_item.h +++ b/include/osmocom/core/stat_item.h @@ -12,7 +12,7 @@ struct osmo_stat_item_desc; -#define STAT_ITEM_NOVALUE_ID 0 +#define OSMO_STAT_ITEM_NOVALUE_ID 0 #define OSMO_STAT_ITEM_NO_UNIT NULL struct osmo_stat_item_value { diff --git a/src/stat_item.c b/src/stat_item.c index a6a8481ee..fcd6781eb 100644 --- a/src/stat_item.c +++ b/src/stat_item.c @@ -105,7 +105,7 @@ struct osmo_stat_item_group *osmo_stat_item_group_alloc(void *ctx, for (i = 0; i <= item->last_offs; i++) { item->values[i].value = desc->item_desc[item_idx].default_value; - item->values[i].id = STAT_ITEM_NOVALUE_ID; + item->values[i].id = OSMO_STAT_ITEM_NOVALUE_ID; } } @@ -128,7 +128,7 @@ void osmo_stat_item_set(struct osmo_stat_item *item, int32_t value) item->last_offs = 0; global_value_id += 1; - if (global_value_id == STAT_ITEM_NOVALUE_ID) + if (global_value_id == OSMO_STAT_ITEM_NOVALUE_ID) global_value_id += 1; item->values[item->last_offs].value = value; @@ -147,7 +147,7 @@ int osmo_stat_item_get_next(const struct osmo_stat_item *item, int32_t *next_idx next_value = &item->values[next_offs]; while (next_value->id - *next_idx >= 0 && - next_value->id != STAT_ITEM_NOVALUE_ID) + next_value->id != OSMO_STAT_ITEM_NOVALUE_ID) { item_value = next_value;