[PATCH 2/6] ProcGrabButton: remove redundant error check.

Alan Coopersmith alan.coopersmith at oracle.com
Mon Apr 26 09:16:28 PDT 2010


Jamey Sharp wrote:
> If dixLookupResourceByType did not return Success, it will have set the
> pointer to NULL, so the second if will always be true.
> 
> Signed-off-by: Jamey Sharp <jamey at minilop.net>
> ---
>  dix/events.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/dix/events.c b/dix/events.c
> index 6d0137d..b26e28a 100644
> --- a/dix/events.c
> +++ b/dix/events.c
> @@ -5355,7 +5355,6 @@ ProcGrabButton(ClientPtr client)
>  	rc = dixLookupResourceByType((pointer *)&cursor, stuff->cursor, RT_CURSOR,
>  			       client, DixUseAccess);
>  	if (rc != Success)
> -	if (!cursor)
>  	{
>  	    client->errorValue = stuff->cursor;
>  	    return (rc == BadValue) ? BadCursor : rc;

Yeah, that looks like a merge error in 41355a53.

Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list