diff options
author | taiyu <taiyu.len@gmail.com> | 2015-09-18 06:52:04 -0700 |
---|---|---|
committer | taiyu <taiyu.len@gmail.com> | 2015-09-18 06:52:04 -0700 |
commit | d2e2b04bfd505561981c9137bfc493bb8effe63e (patch) | |
tree | 8e720c0114cab4639393b4debc3f37de16bc4ed3 | |
parent | style, safer fork (diff) | |
download | sway-d2e2b04bfd505561981c9137bfc493bb8effe63e.tar.gz sway-d2e2b04bfd505561981c9137bfc493bb8effe63e.tar.zst sway-d2e2b04bfd505561981c9137bfc493bb8effe63e.zip |
minor fix
-rw-r--r-- | sway/container.c | 2 | ||||
-rw-r--r-- | sway/handlers.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sway/container.c b/sway/container.c index ef0e6c55..d6bcc4c2 100644 --- a/sway/container.c +++ b/sway/container.c | |||
@@ -403,7 +403,7 @@ swayc_t *swayc_by_test(swayc_t *container, bool (*test)(swayc_t *view, void *dat | |||
403 | } | 403 | } |
404 | 404 | ||
405 | static bool test_name(swayc_t *view, void *data) { | 405 | static bool test_name(swayc_t *view, void *data) { |
406 | if (!view && !view->name) { | 406 | if (!view || !view->name) { |
407 | return false; | 407 | return false; |
408 | } | 408 | } |
409 | return strcmp(view->name, data) == 0; | 409 | return strcmp(view->name, data) == 0; |
diff --git a/sway/handlers.c b/sway/handlers.c index 096df53c..15fa6521 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -331,7 +331,7 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier | |||
331 | struct sway_binding *binding = mode->bindings->items[i]; | 331 | struct sway_binding *binding = mode->bindings->items[i]; |
332 | 332 | ||
333 | if ((modifiers->mods ^ binding->modifiers) == 0) { | 333 | if ((modifiers->mods ^ binding->modifiers) == 0) { |
334 | bool match; | 334 | bool match = false; |
335 | int j; | 335 | int j; |
336 | for (j = 0; j < binding->keys->length; ++j) { | 336 | for (j = 0; j < binding->keys->length; ++j) { |
337 | xkb_keysym_t *key = binding->keys->items[j]; | 337 | xkb_keysym_t *key = binding->keys->items[j]; |