mirror of
https://github.com/swaywm/sway.git
synced 2024-11-14 06:24:20 +01:00
Style fixes for bind.c
This commit is contained in:
parent
f2fe93d171
commit
eb00edc6e2
@ -69,8 +69,9 @@ bool binding_key_compare(struct sway_binding *binding_a,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct cmd_results * cmd_bindsym_or_bindcode(int argc, char **argv, bool bindcode) {
|
static struct cmd_results *cmd_bindsym_or_bindcode(int argc, char **argv,
|
||||||
const char* bindtype = bindcode ? "bindcode" : "bindsym";
|
bool bindcode) {
|
||||||
|
const char *bindtype = bindcode ? "bindcode" : "bindsym";
|
||||||
|
|
||||||
struct cmd_results *error = NULL;
|
struct cmd_results *error = NULL;
|
||||||
if ((error = checkarg(argc, bindtype, EXPECTED_MORE_THAN, 1))) {
|
if ((error = checkarg(argc, bindtype, EXPECTED_MORE_THAN, 1))) {
|
||||||
@ -149,7 +150,7 @@ static struct cmd_results * cmd_bindsym_or_bindcode(int argc, char **argv, bool
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uint32_t *key = calloc(1, sizeof(xkb_keysym_t));
|
uint32_t *key = calloc(1, sizeof(uint32_t));
|
||||||
if (!key) {
|
if (!key) {
|
||||||
free_sway_binding(binding);
|
free_sway_binding(binding);
|
||||||
free_flat_list(split);
|
free_flat_list(split);
|
||||||
@ -158,9 +159,9 @@ static struct cmd_results * cmd_bindsym_or_bindcode(int argc, char **argv, bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (bindcode) {
|
if (bindcode) {
|
||||||
*key = (uint32_t) keycode;
|
*key = (uint32_t)keycode;
|
||||||
} else {
|
} else {
|
||||||
*key = (uint32_t) keysym;
|
*key = (uint32_t)keysym;
|
||||||
}
|
}
|
||||||
|
|
||||||
list_add(binding->keys, key);
|
list_add(binding->keys, key);
|
||||||
|
Loading…
Reference in New Issue
Block a user