summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-05-10 15:32:47 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-06-07 13:30:58 +1000
commit4bcf43919a14cd2cd20af4099cd213ce25792edb (patch)
tree9a66f50c28fe812332ada9505c98920fe7351d1c /dix
parent642569fc79a1814acca1c8f529539b054bf36907 (diff)
dix: use BUG_RETURN_VAL for pairing errors
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/dix/devices.c b/dix/devices.c
index 0c62a012d..bbb4fa2a9 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)