summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-08 10:29:16 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-12-08 10:33:15 +0100
commitac4ed17dbd15ed703583584626d820f66ea5a17d (patch)
tree84b90024031ba55f7396ab12772aba818c1b14f2
parentaf5bad5ed00f0d21617c34f0e4e96eb2fd977a02 (diff)
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
-rw-r--r--include/osmocom/core/stat_item.h2
-rw-r--r--src/stat_item.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/include/osmocom/core/stat_item.h b/include/osmocom/core/stat_item.h
index b3a3d9c2..181b029f 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 a6a8481e..fcd6781e 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;