diff options
author | Keith Packard <keithp@keithp.com> | 2008-08-06 15:26:24 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-03-09 13:08:09 -0700 |
commit | f8dd80d13bb5313a11b38b280f8ad3e22f0a6300 (patch) | |
tree | e0aea0e92304c050bb9eda0b7e4b71ad1d242e90 /Xext | |
parent | 0d9a42dc0380d1583889b6b6521bd5a2451735d4 (diff) |
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.
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/saver.c | 8 | ||||
-rw-r--r-- | Xext/security.c | 4 | ||||
-rw-r--r-- | Xext/shape.c | 2 | ||||
-rw-r--r-- | Xext/sync.c | 2 | ||||
-rw-r--r-- | Xext/xselinux.c | 2 | ||||
-rw-r--r-- | Xext/xtest.c | 6 |
6 files changed, 12 insertions, 12 deletions
diff --git a/Xext/saver.c b/Xext/saver.c index cd6774928..357c2155f 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -1026,7 +1026,7 @@ ScreenSaverSetAttributes (ClientPtr client) } else { - ret = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP, + ret = dixLookupResourceByType((pointer *)&pPixmap, pixID, RT_PIXMAP, client, DixReadAccess); if (ret == Success) { @@ -1064,7 +1064,7 @@ ScreenSaverSetAttributes (ClientPtr client) } else { - ret = dixLookupResource((pointer *)&pPixmap, pixID, RT_PIXMAP, + ret = dixLookupResourceByType((pointer *)&pPixmap, pixID, RT_PIXMAP, client, DixReadAccess); if (ret == Success) { @@ -1158,7 +1158,7 @@ ScreenSaverSetAttributes (ClientPtr client) break; case CWColormap: cmap = (Colormap) *pVlist; - ret = dixLookupResource((pointer *)&pCmap, cmap, RT_COLORMAP, + ret = dixLookupResourceByType((pointer *)&pCmap, cmap, RT_COLORMAP, client, DixUseAccess); if (ret != Success) { @@ -1182,7 +1182,7 @@ ScreenSaverSetAttributes (ClientPtr client) } else { - ret = dixLookupResource((pointer *)&pCursor, cursorID, + ret = dixLookupResourceByType((pointer *)&pCursor, cursorID, RT_CURSOR, client, DixUseAccess); if (ret != Success) { diff --git a/Xext/security.c b/Xext/security.c index fc4691b0e..c9077c87e 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -1015,7 +1015,7 @@ SecurityClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) case ClientStateRunning: state->authId = AuthorizationIDOfClient(pci->client); - rc = dixLookupResource((pointer *)&pAuth, state->authId, + rc = dixLookupResourceByType((pointer *)&pAuth, state->authId, SecurityAuthorizationResType, serverClient, DixGetAttrAccess); if (rc == Success) { @@ -1030,7 +1030,7 @@ SecurityClientState(CallbackListPtr *pcbl, pointer unused, pointer calldata) case ClientStateGone: case ClientStateRetained: - rc = dixLookupResource((pointer *)&pAuth, state->authId, + rc = dixLookupResourceByType((pointer *)&pAuth, state->authId, SecurityAuthorizationResType, serverClient, DixGetAttrAccess); if (rc == Success) { diff --git a/Xext/shape.c b/Xext/shape.c index 2a6a38b7d..15d2c5c5a 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -411,7 +411,7 @@ ProcShapeMask (ClientPtr client) if (stuff->src == None) srcRgn = 0; else { - rc = dixLookupResource((pointer *)&pPixmap, stuff->src, RT_PIXMAP, + rc = dixLookupResourceByType((pointer *)&pPixmap, stuff->src, RT_PIXMAP, client, DixReadAccess); if (rc != Success) return (rc == BadValue) ? BadPixmap : rc; diff --git a/Xext/sync.c b/Xext/sync.c index a30895ddf..adb732447 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -263,7 +263,7 @@ SyncInitTrigger(ClientPtr client, SyncTrigger *pTrigger, XSyncCounter counter, { if (counter == None) pCounter = NULL; - else if (Success != (rc = dixLookupResource((pointer *)&pCounter, + else if (Success != (rc = dixLookupResourceByType ((pointer *)&pCounter, counter, RTCounter, client, DixReadAccess))) { client->errorValue = counter; diff --git a/Xext/xselinux.c b/Xext/xselinux.c index f1003e637..cc973194f 100644 --- a/Xext/xselinux.c +++ b/Xext/xselinux.c @@ -553,7 +553,7 @@ SELinuxLabelInitial(void) SELinuxScreen(NULL, NULL, &srec); /* Do the default colormap */ - dixLookupResource(&unused, screenInfo.screens[i]->defColormap, + dixLookupResourceByType(&unused, screenInfo.screens[i]->defColormap, RT_COLORMAP, serverClient, DixCreateAccess); } } diff --git a/Xext/xtest.c b/Xext/xtest.c index 6f0d1acf3..fe3816e9c 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -123,8 +123,8 @@ ProcXTestCompareCursor(ClientPtr client) else if (stuff->cursor == XTestCurrentCursor) pCursor = GetSpriteCursor(ptr); else { - rc = dixLookupResource((pointer *)&pCursor, stuff->cursor, RT_CURSOR, - client, DixReadAccess); + rc = dixLookupResourceByType((pointer *)&pCursor, stuff->cursor, RT_CURSOR, + client, DixReadAccess); if (rc != Success) { client->errorValue = stuff->cursor; @@ -156,7 +156,7 @@ ProcXTestFakeInput(ClientPtr client) int numValuators = 0; int firstValuator = 0; EventListPtr events; - int nevents; + int nevents = 0; int i; int base = 0; |