summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/core/rate_ctr.h2
-rw-r--r--src/rate_ctr.c4
-rw-r--r--src/statistics.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/osmocom/core/rate_ctr.h b/include/osmocom/core/rate_ctr.h
index 63baa322..ebb8646c 100644
--- a/include/osmocom/core/rate_ctr.h
+++ b/include/osmocom/core/rate_ctr.h
@@ -76,5 +76,5 @@ static inline void rate_ctr_inc(struct rate_ctr *ctr)
int rate_ctr_init(void *tall_ctx);
struct rate_ctr_group *rate_ctr_get_group_by_name_idx(const char *name, const unsigned int idx);
-struct rate_ctr *rate_ctr_get_by_name(const struct rate_ctr_group *ctrg, const char *name);
+const struct rate_ctr *rate_ctr_get_by_name(const struct rate_ctr_group *ctrg, const char *name);
#endif /* RATE_CTR_H */
diff --git a/src/rate_ctr.c b/src/rate_ctr.c
index a7fc9496..a0e18148 100644
--- a/src/rate_ctr.c
+++ b/src/rate_ctr.c
@@ -142,10 +142,10 @@ struct rate_ctr_group *rate_ctr_get_group_by_name_idx(const char *name, const un
return NULL;
}
-struct rate_ctr *rate_ctr_get_by_name(const struct rate_ctr_group *ctrg, const char *name)
+const struct rate_ctr *rate_ctr_get_by_name(const struct rate_ctr_group *ctrg, const char *name)
{
int i;
- struct rate_ctr_desc *ctr_desc;
+ const struct rate_ctr_desc *ctr_desc;
if (!ctrg->desc)
return NULL;
diff --git a/src/statistics.c b/src/statistics.c
index d1ffe526..a6121401 100644
--- a/src/statistics.c
+++ b/src/statistics.c
@@ -20,8 +20,8 @@
*
*/
-
#include <sys/types.h>
+#include <string.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/talloc.h>