From 769b91c580832eea279770d8a14f8aa23bf16f34 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sat, 8 Feb 2014 15:30:05 +0200 Subject: Use (1u << idx) instead of (1 << idx) where appropriate It doesn't matter (I think), since the implicit conversion doesn't have any effect (e.g. sign-extension). But it's better to be aware of the type. Signed-off-by: Ran Benita --- src/x11/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/x11') diff --git a/src/x11/keymap.c b/src/x11/keymap.c index 9d680b1..8581a79 100644 --- a/src/x11/keymap.c +++ b/src/x11/keymap.c @@ -684,7 +684,7 @@ get_indicators(struct xkb_keymap *keymap, xcb_connection_t *conn, darray_resize0(keymap->leds, msb_pos(reply->which)); for (int i = 0; i < NUM_INDICATORS; i++) { - if (reply->which & (1 << i)) { + if (reply->which & (1u << i)) { xcb_xkb_indicator_map_t *wire = iter.data; struct xkb_led *led = &darray_item(keymap->leds, i); @@ -886,7 +886,7 @@ get_indicator_names(struct xkb_keymap *keymap, xcb_connection_t *conn, FAIL_UNLESS(msb_pos(reply->indicators) <= (int) darray_size(keymap->leds)); for (int i = 0; i < NUM_INDICATORS; i++) { - if (reply->indicators & (1 << i)) { + if (reply->indicators & (1u << i)) { xcb_atom_t wire = *iter; struct xkb_led *led = &darray_item(keymap->leds, i); -- cgit v1.2.1