[PATCH 3/4] dix: use BUG_RETURN_VAL for pairing errors
Alan Coopersmith
alan.coopersmith at oracle.com
Tue May 15 10:50:49 PDT 2012
On 05/15/12 03:26 AM, Peter Hutterer wrote:
> 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)
Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the xorg-devel
mailing list