diff options
author | Ran Benita <ran234@gmail.com> | 2016-06-09 15:30:21 +0300 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2016-06-09 15:30:21 +0300 |
commit | c8e6996ff9285be27831d963438ff9fb5ef78999 (patch) | |
tree | 9902238338409776f67e4e61c9b9fd0c7ae19e33 /src/state.c | |
parent | 81ee012af08e7bdb48a714856032432c706c9be8 (diff) | |
download | xorg-lib-libxkbcommon-c8e6996ff9285be27831d963438ff9fb5ef78999.tar.gz |
src/state: match_mod_masks can return bool instead of int
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/state.c')
-rw-r--r-- | src/state.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/state.c b/src/state.c index a45315d..8845a4e 100644 --- a/src/state.c +++ b/src/state.c @@ -1140,7 +1140,7 @@ xkb_state_mod_index_is_active(struct xkb_state *state, * Helper function for xkb_state_mod_indices_are_active and * xkb_state_mod_names_are_active. */ -static int +static bool match_mod_masks(struct xkb_state *state, enum xkb_state_component type, enum xkb_state_match match, @@ -1149,14 +1149,12 @@ match_mod_masks(struct xkb_state *state, xkb_mod_mask_t active = xkb_state_serialize_mods(state, type); if (!(match & XKB_STATE_MATCH_NON_EXCLUSIVE) && (active & ~wanted)) - return 0; + return false; if (match & XKB_STATE_MATCH_ANY) - return !!(active & wanted); - else - return (active & wanted) == wanted; + return active & wanted; - return 0; + return (active & wanted) == wanted; } /** |