From cb3c7276324b5b0862088df9ffe5498998edae91 Mon Sep 17 00:00:00 2001 From: Manuel Stoeckl Date: Tue, 2 Feb 2021 19:54:35 -0500 Subject: Declare all struct cmd_handler arrays const And make the functions handling these arrays use const types. --- sway/commands/bar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sway/commands/bar.c') diff --git a/sway/commands/bar.c b/sway/commands/bar.c index d42b7fc2..a58f5438 100644 --- a/sway/commands/bar.c +++ b/sway/commands/bar.c @@ -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 }, }; -- cgit v1.2.3-54-g00ecf