summaryrefslogtreecommitdiff
path: root/components/keymap.c
diff options
context:
space:
mode:
authordrkhsh <me@drkhsh.at>2022-10-28 00:51:34 +0200
committerdrkhsh <me@drkhsh.at>2022-10-28 01:03:38 +0200
commit3251e911878b78b0aad8fc09c782f8d81c878f75 (patch)
treedc9b6927e963a994286babd803357615c9b37a22 /components/keymap.c
parent2104dc362ca7336d98499a5945ea2a3d371f7568 (diff)
downloadslstatus-3251e911878b78b0aad8fc09c782f8d81c878f75.tar.gz
radical re-formatting 2/3: Fix blocks
Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/
Diffstat (limited to 'components/keymap.c')
-rw-r--r--components/keymap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/components/keymap.c b/components/keymap.c
index e2dbc6f..4740431 100644
--- a/components/keymap.c
+++ b/components/keymap.c
@@ -15,11 +15,9 @@ valid_layout_or_variant(char *sym)
/* invalid symbols from xkb rules config */
static const char *invalid[] = { "evdev", "inet", "pc", "base" };
- for (i = 0; i < LEN(invalid); i++) {
- if (!strncmp(sym, invalid[i], strlen(invalid[i]))) {
+ for (i = 0; i < LEN(invalid); i++)
+ if (!strncmp(sym, invalid[i], strlen(invalid[i])))
return 0;
- }
- }
return 1;
}
@@ -80,9 +78,8 @@ keymap(const char *unused)
XFree(symbols);
end:
XkbFreeKeyboard(desc, XkbSymbolsNameMask, 1);
- if (XCloseDisplay(dpy)) {
+ if (XCloseDisplay(dpy))
warn("XCloseDisplay: Failed to close display");
- }
return layout;
}