From 3251e911878b78b0aad8fc09c782f8d81c878f75 Mon Sep 17 00:00:00 2001 From: drkhsh Date: Fri, 28 Oct 2022 00:51:34 +0200 Subject: radical re-formatting 2/3: Fix blocks Fixes coding style. Formatting commits suck, incoherent coding style sucks more. https://suckless.org/coding_style/ --- components/keymap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'components/keymap.c') 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; } -- cgit v1.2.3