Commit 1401b0fb5ed193dd67b5f156957b04cdde69b005

Ran Benita 2012-10-04T12:27:06

expr: don't allow "none" in LookupModIndex LookupModMask handles this before calling LookupModIndex, and the only other user in symbols.c doesn't handle this return value at all. Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c
index a7c91b8..cf6ff40 100644
--- a/src/xkbcomp/expr.c
+++ b/src/xkbcomp/expr.c
@@ -86,12 +86,6 @@ LookupModIndex(struct xkb_context *ctx, const void *priv, xkb_atom_t field,
                enum expr_value_type type, xkb_mod_index_t *val_rtrn)
 {
     const char *name = xkb_atom_text(ctx, field);
-
-    if (istreq(name, "none")) {
-        *val_rtrn = XKB_MOD_INVALID;
-        return true;
-    }
-
     *val_rtrn = ModNameToIndex(name);
     return (*val_rtrn != XKB_MOD_INVALID);
 }