You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/10/13 19:59:36 UTC
incubator-mynewt-core git commit: stats - Add necessary const for
name map.
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/develop 774d32266 -> 256064bac
stats - Add necessary const for name map.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/256064ba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/256064ba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/256064ba
Branch: refs/heads/develop
Commit: 256064baca1b88b8603513dc7c32a7cb3e781d3d
Parents: 774d322
Author: Christopher Collins <cc...@apache.org>
Authored: Thu Oct 13 12:56:40 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Thu Oct 13 12:59:20 2016 -0700
----------------------------------------------------------------------
sys/stats/include/stats/stats.h | 2 +-
sys/stats/src/stats.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/256064ba/sys/stats/include/stats/stats.h
----------------------------------------------------------------------
diff --git a/sys/stats/include/stats/stats.h b/sys/stats/include/stats/stats.h
index 95fe45f..e7fe074 100644
--- a/sys/stats/include/stats/stats.h
+++ b/sys/stats/include/stats/stats.h
@@ -109,7 +109,7 @@ int stats_init(struct stats_hdr *shdr, uint8_t size, uint8_t cnt,
const struct stats_name_map *map, uint8_t map_cnt);
int stats_register(char *name, struct stats_hdr *shdr);
int stats_init_and_reg(struct stats_hdr *shdr, uint8_t size, uint8_t cnt,
- struct stats_name_map *map, uint8_t map_cnt,
+ const struct stats_name_map *map, uint8_t map_cnt,
char *name);
typedef int (*stats_walk_func_t)(struct stats_hdr *, void *, char *,
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/256064ba/sys/stats/src/stats.c
----------------------------------------------------------------------
diff --git a/sys/stats/src/stats.c b/sys/stats/src/stats.c
index 1e4b44e..5ae86e1 100644
--- a/sys/stats/src/stats.c
+++ b/sys/stats/src/stats.c
@@ -330,7 +330,8 @@ err:
*/
int
stats_init_and_reg(struct stats_hdr *shdr, uint8_t size, uint8_t cnt,
- struct stats_name_map *map, uint8_t map_cnt, char *name)
+ const struct stats_name_map *map, uint8_t map_cnt,
+ char *name)
{
int rc;