[PATCH 3/4] dix: use BUG_RETURN_VAL for pairing errors
Peter Hutterer
peter.hutterer at who-t.net
Tue May 15 03:26:40 PDT 2012
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
dix/devices.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/dix/devices.c b/dix/devices.c
index 51a74b6..04008d4 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -365,13 +365,12 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent)
/* mode doesn't matter */
EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor);
}
- else if ((other = NextFreePointerDevice()) == NULL) {
- ErrorF("[dix] cannot find pointer to pair with. "
- "This is a bug.\n");
- return FALSE;
- }
- else
+ else {
+ other = NextFreePointerDevice();
+ BUG_RETURN_VAL_MSG(other == NULL, FALSE,
+ "[dix] cannot find pointer to pair with.\n");
PairDevices(NULL, other, dev);
+ }
}
else {
if (dev->coreEvents)
--
1.7.10.1
More information about the xorg-devel
mailing list