symbols, keycodes: fix int return type when bool is intended 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 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
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;