summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-13 12:50:44 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-13 12:50:44 +0200
commitdd178b2dc9a34aaa28ee00300db9d5ef6d45e820 (patch)
tree74e1763540d9a81ae3983d71e3c8b7d6f119a993
parent087fcff9a5342f7a10c9f378bd4130f409657001 (diff)
rate_counters: Remove group-name-sprintf-with-idx string
-rw-r--r--include/osmocore/rate_ctr.h3
-rw-r--r--src/rate_ctr.c3
2 files changed, 1 insertions, 5 deletions
diff --git a/include/osmocore/rate_ctr.h b/include/osmocore/rate_ctr.h
index 47fd5a36..85fe5c1f 100644
--- a/include/osmocore/rate_ctr.h
+++ b/include/osmocore/rate_ctr.h
@@ -49,9 +49,8 @@ struct rate_ctr_group {
struct llist_head list;
/* Pointer to the counter group class */
const struct rate_ctr_group_desc *desc;
+ /* The index of this ctr_group within its class */
unsigned int idx;
- /* The name prefix generated from desc->group_prefix_fmt and index */
- char *name_prefix;
/* Actual counter structures below */
struct rate_ctr ctr[0];
};
diff --git a/src/rate_ctr.c b/src/rate_ctr.c
index bde090a4..e48c7792 100644
--- a/src/rate_ctr.c
+++ b/src/rate_ctr.c
@@ -52,9 +52,6 @@ struct rate_ctr_group *rate_ctr_group_alloc(void *ctx,
group->desc = desc;
group->idx = idx;
- /* Generate the Group prefix from the user-specified index */
- group->name_prefix = talloc_size(group, strlen(desc->group_prefix_fmt) + 20);
- sprintf(group->name_prefix, desc->group_prefix_fmt, idx);
llist_add(&group->list, &rate_ctr_groups);