diff options
author | Ran Benita <ran234@gmail.com> | 2014-02-22 23:43:19 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2014-02-22 23:45:52 +0200 |
commit | caf8f3be986d6ac20ec2c537910de3d5ea9d6a16 (patch) | |
tree | 55f6ddebc752e67a9138fefde560d9f91d543085 /src | |
parent | 09bcf0ffc0de321415fb52e62dd96caac5031c3c (diff) | |
download | libxkbcommon-caf8f3be986d6ac20ec2c537910de3d5ea9d6a16.tar.gz libxkbcommon-caf8f3be986d6ac20ec2c537910de3d5ea9d6a16.tar.bz2 libxkbcommon-caf8f3be986d6ac20ec2c537910de3d5ea9d6a16.zip |
symbols, keycodes: fix int return type when bool is intended
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/xkbcomp/keycodes.c | 8 | ||||
-rw-r--r-- | src/xkbcomp/symbols.c | 12 |
2 files changed, 10 insertions, 10 deletions
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; |