x11: stylistic fixes Signed-off-by: Ran Benita <ran@unusedvar.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
diff --git a/src/x11/keymap.c b/src/x11/keymap.c
index df150d1..774ccdf 100644
--- a/src/x11/keymap.c
+++ b/src/x11/keymap.c
@@ -1160,27 +1160,27 @@ xkb_x11_keymap_new_from_device(struct xkb_context *ctx,
struct x11_atom_interner interner;
x11_atom_interner_init(&interner, ctx, conn);
- xcb_xkb_get_map_cookie_t get_map_cookie =
+ xcb_xkb_get_map_cookie_t map_cookie =
xcb_xkb_get_map(conn, device_id, get_map_required_components,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
xcb_xkb_get_indicator_map_cookie_t indicator_map_cookie =
xcb_xkb_get_indicator_map(conn, device_id, ALL_INDICATORS_MASK);
xcb_xkb_get_compat_map_cookie_t compat_map_cookie =
xcb_xkb_get_compat_map(conn, device_id, 0, true, 0, 0);
- xcb_xkb_get_names_cookie_t get_names_cookie =
+ xcb_xkb_get_names_cookie_t names_cookie =
xcb_xkb_get_names(conn, device_id, get_names_wanted);
- xcb_xkb_get_controls_cookie_t get_controls_cookie =
+ xcb_xkb_get_controls_cookie_t controls_cookie =
xcb_xkb_get_controls(conn, device_id);
bool had_error = false;
- had_error |= !get_map(keymap, conn, get_map_cookie);
+ had_error |= !get_map(keymap, conn, map_cookie);
had_error |= !get_indicator_map(keymap, conn, indicator_map_cookie);
had_error |= !get_compat_map(keymap, conn, compat_map_cookie);
- had_error |= !get_names(keymap, &interner, get_names_cookie);
- had_error |= !get_controls(keymap, conn, get_controls_cookie);
-
+ had_error |= !get_names(keymap, &interner, names_cookie);
+ had_error |= !get_controls(keymap, conn, controls_cookie);
x11_atom_interner_round_trip(&interner);
had_error |= interner.had_error;
+
if (had_error) {
xkb_keymap_unref(keymap);
return NULL;
diff --git a/src/x11/util.c b/src/x11/util.c
index 2ea92a2..cc4c71c 100644
--- a/src/x11/util.c
+++ b/src/x11/util.c
@@ -215,7 +215,8 @@ retry:
interner->pending[idx].cookie = xcb_get_atom_name(interner->conn, atom);
}
-void x11_atom_interner_round_trip(struct x11_atom_interner *interner) {
+void
+x11_atom_interner_round_trip(struct x11_atom_interner *interner) {
struct xkb_context *ctx = interner->ctx;
xcb_connection_t *conn = interner->conn;