mirror of
https://github.com/swaywm/sway.git
synced 2024-12-27 15:36:29 +01:00
Make cmd_handler.command const
This commit is contained in:
parent
9540591105
commit
6ec57271b6
2 changed files with 3 additions and 3 deletions
|
@ -9,7 +9,7 @@ struct sway_container;
|
|||
typedef struct cmd_results *sway_cmd(int argc, char **argv);
|
||||
|
||||
struct cmd_handler {
|
||||
char *command;
|
||||
const char *command;
|
||||
sway_cmd *handle;
|
||||
};
|
||||
|
||||
|
@ -46,7 +46,7 @@ enum expected_args {
|
|||
struct cmd_results *checkarg(int argc, const char *name,
|
||||
enum expected_args type, int val);
|
||||
|
||||
const struct cmd_handler *find_handler(char *line,
|
||||
const struct cmd_handler *find_handler(const char *line,
|
||||
const struct cmd_handler *cmd_handlers, size_t handlers_size);
|
||||
|
||||
/**
|
||||
|
|
|
@ -148,7 +148,7 @@ static int handler_compare(const void *_a, const void *_b) {
|
|||
return strcasecmp(a->command, b->command);
|
||||
}
|
||||
|
||||
const struct cmd_handler *find_handler(char *line,
|
||||
const struct cmd_handler *find_handler(const char *line,
|
||||
const struct cmd_handler *handlers, size_t handlers_size) {
|
||||
if (!handlers || !handlers_size) {
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue