Commit 13d232592e309c49c4381b39b3a4c113020b9946

Ran Benita 2015-09-07T14:45:09

state: reduce scope of fake action Also rename to "dummy" as I think it is a nicer name. Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/src/state.c b/src/state.c
index f7a429e..83ff872 100644
--- a/src/state.c
+++ b/src/state.c
@@ -215,21 +215,21 @@ xkb_state_key_get_layout(struct xkb_state *state, xkb_keycode_t kc)
                                  key->out_of_range_group_number);
 }
 
-static const union xkb_action fake = { .type = ACTION_TYPE_NONE };
-
 static const union xkb_action *
 xkb_key_get_action(struct xkb_state *state, const struct xkb_key *key)
 {
+    static const union xkb_action dummy = { .type = ACTION_TYPE_NONE };
+
     xkb_layout_index_t layout;
     xkb_level_index_t level;
 
     layout = xkb_state_key_get_layout(state, key->keycode);
     if (layout == XKB_LAYOUT_INVALID)
-        return &fake;
+        return &dummy;
 
     level = xkb_state_key_get_level(state, key->keycode, layout);
     if (level == XKB_LEVEL_INVALID)
-        return &fake;
+        return &dummy;
 
     return &key->groups[layout].levels[level].action;
 }