From 064ee458c7183eb91ef2e0f262b312ba1e3ad6e5 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 9 Aug 2008 15:54:56 +0300 Subject: [PATCH] XKB: Tiny cleanups to _XkbLookupAnyDevice A couple of coding style cleanups, a warning fix via removing a now-unused label, and also put an else so we don't spuriously trip a condition that should admittedly never occur anyway. Signed-off-by: Peter Hutterer --- xkb/xkbUtils.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c index 61d37af24..aafc1ab0a 100644 --- a/xkb/xkbUtils.c +++ b/xkb/xkbUtils.c @@ -79,14 +79,15 @@ _XkbLookupAnyDevice(DeviceIntPtr *pDev, int id, ClientPtr client, { int rc = XkbKeyboardErrorCode; - if (id == XkbUseCoreKbd) { + if (id == XkbUseCoreKbd) id = PickKeyboard(client)->id; - } else if (id == XkbUseCorePtr) { + else if (id == XkbUseCorePtr) id = PickPointer(client)->id; - } + rc = dixLookupDevice(pDev, id, client, access_mode); if (rc != Success) *xkb_err = XkbErr_BadDevice; + return rc; }