mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
It is silly for cmd_list_parse to return an integer error when it could
just return NULL.
This commit is contained in:
@ -379,12 +379,10 @@ key_bindings_init(void)
|
||||
u_int i;
|
||||
struct cmd_list *cmdlist;
|
||||
char *cause;
|
||||
int error;
|
||||
|
||||
for (i = 0; i < nitems(defaults); i++) {
|
||||
error = cmd_string_parse(defaults[i], &cmdlist,
|
||||
"<default-keys>", i, &cause);
|
||||
if (error != 0)
|
||||
cmdlist = cmd_string_parse(defaults[i], "<default>", i, &cause);
|
||||
if (cmdlist == NULL)
|
||||
fatalx("bad default key");
|
||||
cmdq_append(NULL, cmdq_get_command(cmdlist, NULL, NULL, 0));
|
||||
cmd_list_free(cmdlist);
|
||||
|
Reference in New Issue
Block a user