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

Jamey Sharp jamey at minilop.net
Sun Apr 25 03:35:34 PDT 2010


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;
-- 
1.7.0



More information about the xorg-devel mailing list