Commit b3aced7e22f8d7e8f7f2b419a93f5f2d631bca1c

Ran Benita 2012-08-28T11:14:54

vmod: ClearVModInfo doesn't need the keymap Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index dfc6941..bcdc2ee 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -282,7 +282,7 @@ ClearCompatInfo(CompatInfo *info)
     FreeActionInfo(info->act);
     info->act = NULL;
     info->keymap = NULL;
-    ClearVModInfo(&info->vmods, keymap);
+    ClearVModInfo(&info->vmods);
 }
 
 static SymInterpInfo *
diff --git a/src/xkbcomp/vmod.c b/src/xkbcomp/vmod.c
index c70b884..9ee5d39 100644
--- a/src/xkbcomp/vmod.c
+++ b/src/xkbcomp/vmod.c
@@ -25,27 +25,25 @@
  ********************************************************/
 
 #include "xkbcomp-priv.h"
-#include "text.h"
 #include "expr.h"
 #include "vmod.h"
 
 void
 InitVModInfo(VModInfo *info, struct xkb_keymap *keymap)
 {
-    ClearVModInfo(info, keymap);
+    xkb_group_index_t i;
+
+    info->defined = info->available = 0;
+
+    for (i = 0; i < XkbNumVirtualMods; i++)
+        if (keymap->vmod_names[i])
+            info->defined |= (1 << i);
 }
 
 void
-ClearVModInfo(VModInfo *info, struct xkb_keymap *keymap)
+ClearVModInfo(VModInfo *info)
 {
-    xkb_mod_index_t i;
-    xkb_mod_mask_t bit;
-
     info->defined = info->available = 0;
-
-    for (i = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1)
-        if (keymap->vmod_names[i])
-            info->defined |= bit;
 }
 
 /***====================================================================***/
diff --git a/src/xkbcomp/vmod.h b/src/xkbcomp/vmod.h
index 5748d01..a711b9b 100644
--- a/src/xkbcomp/vmod.h
+++ b/src/xkbcomp/vmod.h
@@ -36,7 +36,7 @@ void
 InitVModInfo(VModInfo *info, struct xkb_keymap *keymap);
 
 void
-ClearVModInfo(VModInfo *info, struct xkb_keymap *keymap);
+ClearVModInfo(VModInfo *info);
 
 bool
 HandleVModDef(VModDef *stmt, struct xkb_keymap *keymap,