diff options
author | Oliver Smith <osmith@sysmocom.de> | 2021-03-26 11:34:34 +0100 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2021-04-06 11:27:34 +0200 |
commit | d3490bc442ec68d300bbb96b419d25c25de0f01e (patch) | |
tree | 0fb8dc37368ffa545a5a62e9d36512a6532e99d4 /include | |
parent | 8bd63b667e64ac8b91b33b7845967ddaf2628c64 (diff) |
stat_item: make next_id argument name consistent
Let osmo_stat_item_get_next, osmo_stat_item_discard,
osmo_stat_item_discard_all consistently refer to their next_id arg as
such (and not idx or next_idx). It refers to an ID (item->values[i].id),
not an index (item->values[i]), and it is always the next one, never the
current one.
Do the same change for _index/_idx variables in stats.c, which are used
as arguments to these functions. Replace rd_ with next_id_ in
stats_test.c, too.
Related: OS#5088
Change-Id: I5dd566b08dff7174d1790f49abd2d6ac020e120e
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/core/stat_item.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/osmocom/core/stat_item.h b/include/osmocom/core/stat_item.h index 4710dba7..4a19465f 100644 --- a/include/osmocom/core/stat_item.h +++ b/include/osmocom/core/stat_item.h @@ -91,14 +91,14 @@ struct osmo_stat_item_group *osmo_stat_item_get_group_by_name_idx( const struct osmo_stat_item *osmo_stat_item_get_by_name( const struct osmo_stat_item_group *statg, const char *name); -int osmo_stat_item_get_next(const struct osmo_stat_item *item, int32_t *idx, int32_t *value); +int osmo_stat_item_get_next(const struct osmo_stat_item *item, int32_t *next_id, int32_t *value); /*! Get the last (freshest) value */ static int32_t osmo_stat_item_get_last(const struct osmo_stat_item *item); -int osmo_stat_item_discard(const struct osmo_stat_item *item, int32_t *idx); +int osmo_stat_item_discard(const struct osmo_stat_item *item, int32_t *next_id); -int osmo_stat_item_discard_all(int32_t *idx); +int osmo_stat_item_discard_all(int32_t *next_id); typedef int (*osmo_stat_item_handler_t)( struct osmo_stat_item_group *, struct osmo_stat_item *, void *); |