commit f9bcaf9
Michael Forney
·
2016-04-30 21:44:57 +0000 UTC
parent 96a0cb7
Avoid conditional with omitted operand
1 files changed,
+5,
-1
+5,
-1
1@@ -110,8 +110,12 @@ client_handle_modifiers(struct keyboard *keyboard, const struct keyboard_modifie
2 static bool
3 update_keymap(struct xkb *xkb)
4 {
5- const char *keymap_directory = getenv("XDG_RUNTIME_DIR") ?: "/tmp";
6+ const char *keymap_directory;
7 char *keymap_string;
8+
9+ if (!(keymap_directory = getenv("XDG_RUNTIME_DIR")))
10+ keymap_directory = "/tmp";
11+
12 char keymap_path[strlen(keymap_directory) + 1 + sizeof keymap_file_template];
13
14 xkb->indices.ctrl = xkb_keymap_mod_get_index(xkb->keymap.map, XKB_MOD_NAME_CTRL);