Commit caf8f3be986d6ac20ec2c537910de3d5ea9d6a16

Ran Benita 2014-02-22T23:43:19

symbols, keycodes: fix int return type when bool is intended Signed-off-by: Ran Benita <ran234@gmail.com>

diff --git a/src/xkbcomp/keycodes.c b/src/xkbcomp/keycodes.c
index b7e70ce..d90f6a4 100644
--- a/src/xkbcomp/keycodes.c
+++ b/src/xkbcomp/keycodes.c
@@ -249,7 +249,7 @@ AddKeyName(KeyNamesInfo *info, xkb_keycode_t kc, xkb_atom_t name,
 
 /***====================================================================***/
 
-static int
+static bool
 HandleAliasDef(KeyNamesInfo *info, KeyAliasDef *def, enum merge_mode merge);
 
 static void
@@ -386,7 +386,7 @@ HandleKeycodeDef(KeyNamesInfo *info, KeycodeDef *stmt, enum merge_mode merge)
     return AddKeyName(info, stmt->value, stmt->name, merge, false, true);
 }
 
-static int
+static bool
 HandleAliasDef(KeyNamesInfo *info, KeyAliasDef *def, enum merge_mode merge)
 {
     AliasInfo *old, new;
@@ -426,7 +426,7 @@ HandleAliasDef(KeyNamesInfo *info, KeyAliasDef *def, enum merge_mode merge)
     return true;
 }
 
-static int
+static bool
 HandleKeyNameVar(KeyNamesInfo *info, VarDef *stmt)
 {
     const char *elem, *field;
@@ -451,7 +451,7 @@ HandleKeyNameVar(KeyNamesInfo *info, VarDef *stmt)
     return true;
 }
 
-static int
+static bool
 HandleLedNameDef(KeyNamesInfo *info, LedNameDef *def,
                  enum merge_mode merge)
 {
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index f850feb..bd7f73d 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -930,7 +930,7 @@ SetSymbolsField(SymbolsInfo *info, KeyInfo *keyi, const char *field,
     return true;
 }
 
-static int
+static bool
 SetGroupName(SymbolsInfo *info, ExprDef *arrayNdx, ExprDef *value)
 {
     xkb_layout_index_t group, group_to_use;
@@ -980,16 +980,16 @@ SetGroupName(SymbolsInfo *info, ExprDef *arrayNdx, ExprDef *value)
     return true;
 }
 
-static int
+static bool
 HandleGlobalVar(SymbolsInfo *info, VarDef *stmt)
 {
     const char *elem, *field;
     ExprDef *arrayNdx;
     bool ret;
 
-    if (ExprResolveLhs(info->keymap->ctx, stmt->name, &elem, &field,
-                       &arrayNdx) == 0)
-        return 0;               /* internal error, already reported */
+    if (!ExprResolveLhs(info->keymap->ctx, stmt->name, &elem, &field, &arrayNdx))
+        return false;
+
     if (elem && istreq(elem, "key")) {
         ret = SetSymbolsField(info, &info->default_key, field, arrayNdx,
                               stmt->value);
@@ -1099,7 +1099,7 @@ SetExplicitGroup(SymbolsInfo *info, KeyInfo *keyi)
     return true;
 }
 
-static int
+static bool
 HandleSymbolsDef(SymbolsInfo *info, SymbolsDef *stmt)
 {
     KeyInfo keyi;