summaryrefslogtreecommitdiff
path: root/src/xkbcomp
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2014-02-15 22:59:12 +0200
committerRan Benita <ran234@gmail.com>2014-02-15 22:59:12 +0200
commitb95df2a6cc506cb4e80734170d66c43e836e0ff1 (patch)
treea59e58a308c1e618f1324c87ff3bb67a3ba7a255 /src/xkbcomp
parentefe2880e855195b87d057123e555401bae89b994 (diff)
downloadlibxkbcommon-b95df2a6cc506cb4e80734170d66c43e836e0ff1.tar.gz
libxkbcommon-b95df2a6cc506cb4e80734170d66c43e836e0ff1.tar.bz2
libxkbcommon-b95df2a6cc506cb4e80734170d66c43e836e0ff1.zip
expr: simplify ExprResolveButton
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/xkbcomp')
-rw-r--r--src/xkbcomp/expr.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/xkbcomp/expr.c b/src/xkbcomp/expr.c
index 7b6ecc9..c514f8d 100644
--- a/src/xkbcomp/expr.c
+++ b/src/xkbcomp/expr.c
@@ -427,14 +427,8 @@ ExprResolveLevel(struct xkb_context *ctx, const ExprDef *expr,
bool
ExprResolveButton(struct xkb_context *ctx, const ExprDef *expr, int *btn_rtrn)
{
- int result;
-
- if (!ExprResolveIntegerLookup(ctx, expr, &result, SimpleLookup,
- buttonNames))
- return false;
-
- *btn_rtrn = result;
- return true;
+ return ExprResolveIntegerLookup(ctx, expr, btn_rtrn, SimpleLookup,
+ buttonNames);
}
bool