From f8dd80d13bb5313a11b38b280f8ad3e22f0a6300 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 6 Aug 2008 15:26:24 -0700 Subject: Replace dixLookupResource by dixLookupResourceBy{Type,Class} dixLookupResource attempted to automatically detect whether the caller wanted a lookup by-type or by-class, unfortunately, it guessed wrong for RT_NONE. Instead of trying to make the guess better, this patch just reverts the unification and creates separate functions for each operation. --- dix/dixutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dix/dixutils.c') diff --git a/dix/dixutils.c b/dix/dixutils.c index a382be63f..1bdeee064 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -216,7 +216,7 @@ dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, if (id == INVALID) return BadDrawable; - rc = dixLookupResource((pointer *)&pTmp, id, RC_DRAWABLE, client, access); + rc = dixLookupResourceByClass((pointer *)&pTmp, id, RC_DRAWABLE, client, access); if (rc == BadValue) return BadDrawable; @@ -259,7 +259,7 @@ dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) if (!clientIndex || !clients[clientIndex] || (rid & SERVER_BIT)) goto bad; - rc = dixLookupResource(&pRes, rid, RC_ANY, client, DixGetAttrAccess); + rc = dixLookupResourceByClass(&pRes, rid, RC_ANY, client, DixGetAttrAccess); if (rc != Success) goto bad; -- cgit v1.2.3