Declare all struct cmd_handler arrays const

And make the functions handling these arrays use const types.
This commit is contained in:
Manuel Stoeckl 2021-02-02 19:54:35 -05:00 committed by Simon Ser
parent 89b4bc4bc7
commit cb3c727632
8 changed files with 29 additions and 29 deletions

View file

@ -8,7 +8,7 @@
#include "log.h"
// Must be in alphabetical order for bsearch
static struct cmd_handler bar_handlers[] = {
static const struct cmd_handler bar_handlers[] = {
{ "bindcode", bar_cmd_bindcode },
{ "binding_mode_indicator", bar_cmd_binding_mode_indicator },
{ "bindsym", bar_cmd_bindsym },
@ -41,7 +41,7 @@ static struct cmd_handler bar_handlers[] = {
};
// Must be in alphabetical order for bsearch
static struct cmd_handler bar_config_handlers[] = {
static const struct cmd_handler bar_config_handlers[] = {
{ "id", bar_cmd_id },
{ "swaybar_command", bar_cmd_swaybar_command },
};