mgmt/MCUmgr/grp: Add missing const in mgmt_handler definitions
Make mgmt_handler definitions static const for shell and stat groups. Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
This commit is contained in:
parent
5d9d3d7a69
commit
535278a3ba
2 changed files with 3 additions and 3 deletions
|
@ -154,7 +154,7 @@ static int shell_mgmt_translate_error_code(uint16_t err)
|
|||
}
|
||||
#endif
|
||||
|
||||
static struct mgmt_handler shell_mgmt_handlers[] = {
|
||||
static const struct mgmt_handler shell_mgmt_handlers[] = {
|
||||
[SHELL_MGMT_ID_EXEC] = { NULL, shell_mgmt_exec },
|
||||
};
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
LOG_MODULE_REGISTER(mcumgr_stat_grp, CONFIG_MCUMGR_GRP_STAT_LOG_LEVEL);
|
||||
|
||||
static struct mgmt_handler stat_mgmt_handlers[];
|
||||
static const struct mgmt_handler stat_mgmt_handlers[];
|
||||
|
||||
typedef int stat_mgmt_foreach_entry_fn(zcbor_state_t *zse, struct stat_mgmt_entry *entry);
|
||||
|
||||
|
@ -257,7 +257,7 @@ static int stat_mgmt_translate_error_code(uint16_t err)
|
|||
}
|
||||
#endif
|
||||
|
||||
static struct mgmt_handler stat_mgmt_handlers[] = {
|
||||
static const struct mgmt_handler stat_mgmt_handlers[] = {
|
||||
[STAT_MGMT_ID_SHOW] = { stat_mgmt_show, NULL },
|
||||
[STAT_MGMT_ID_LIST] = { stat_mgmt_list, NULL },
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue