aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-08-23 05:42:20 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-08-23 08:07:00 +0000
commitdabdffafa59f43314333be42aa519d7fff1b4498 (patch)
tree768ae24bdb5c817396865918e3739a8dbd49ac8d /input.c
parentconfig: add user-configured search-binding to the correct binding list (diff)
don't use empty struct initializers
Diffstat (limited to 'input.c')
-rw-r--r--input.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/input.c b/input.c
index b188a140..9d73af95 100644
--- a/input.c
+++ b/input.c
@@ -549,7 +549,7 @@ stop_repeater(struct seat *seat, uint32_t key)
if (key != -1 && key != seat->kbd.repeat.key)
return true;
- if (timerfd_settime(seat->kbd.repeat.fd, 0, &(struct itimerspec){}, NULL) < 0) {
+ if (timerfd_settime(seat->kbd.repeat.fd, 0, &(struct itimerspec){{0}}, NULL) < 0) {
LOG_ERRNO("%s: failed to disarm keyboard repeat timer", seat->name);
return false;
}
@@ -843,7 +843,7 @@ keyboard_key(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
* Compose, and maybe emit "normal" character
*/
- uint8_t buf[64] = {};
+ uint8_t buf[64] = {0};
int count = 0;
if (compose_status == XKB_COMPOSE_COMPOSED) {
@@ -923,7 +923,7 @@ keyboard_key(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial,
const wchar_t wc = 0x80 | buf[0];
char utf8[8];
- mbstate_t ps = {};
+ mbstate_t ps = {0};
size_t chars = wcrtomb(utf8, wc, &ps);
if (chars != (size_t)-1)
@@ -1544,7 +1544,7 @@ wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
continue;
}
- const struct config_key_modifiers no_mods = {};
+ const struct config_key_modifiers no_mods = {0};
if (memcmp(&binding->modifiers, &no_mods, sizeof(no_mods)) != 0) {
/* Binding has modifiers */
continue;