summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2010-11-12 12:04:11 +0100
committerCyril Brulebois <kibi@debian.org>2010-12-07 18:42:45 +0100
commit73fbc4a4a7997b3ee1c779d8f394114270bcb20d (patch)
treecfa829962c2a30251b56e4bb6f00398357c29561
parent6e8b34b7048bc9e49ef52b81e2de1b518a05890e (diff)
Replace SecurityLookupIDByClass() with dixLookupResourceByClass().
This patch has been prepared with the following Coccinelle semantic patch: @@ expression a, b, c, d; identifier r; type t; @@ -r = (t) SecurityLookupIDByClass(a, b, c, d); +dixLookupResourceByClass((pointer*) &r, b, c, a, d); The only occurrence not matching directly was processed after separating declaration of pXinDraw and call to SecurityLookupIDByClass(). Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org>
-rw-r--r--hw/dmx/glxProxy/glxcmds.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c
index 0f8e8d8d3..a58eb3554 100644
--- a/hw/dmx/glxProxy/glxcmds.c
+++ b/hw/dmx/glxProxy/glxcmds.c
@@ -1104,14 +1104,16 @@ static int MakeCurrent(__GLXclientState *cl,
to_screen = screenInfo.numScreens - 1;
if (pDraw && new_reply.writeType != GLX_PBUFFER_TYPE) {
- pXinDraw = (PanoramiXRes *)
- SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
+ dixLookupResourceByClass((pointer*) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
}
if (pReadDraw && pReadDraw != pDraw &&
new_reply.readType != GLX_PBUFFER_TYPE) {
- pXinReadDraw = (PanoramiXRes *)
- SecurityLookupIDByClass(client, pReadDraw->id, XRC_DRAWABLE, DixReadAccess);
+ dixLookupResourceByClass((pointer*) &pXinReadDraw,
+ pReadDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
}
else {
pXinReadDraw = pXinDraw;
@@ -1765,8 +1767,9 @@ static int CreateGLXPixmap(__GLXclientState *cl,
from_screen = 0;
to_screen = screenInfo.numScreens - 1;
- pXinDraw = (PanoramiXRes *)
- SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
+ dixLookupResourceByClass((pointer*) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
}
#endif
@@ -2013,8 +2016,9 @@ int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag)
if (!noPanoramiXExtension) {
from_screen = 0;
to_screen = screenInfo.numScreens - 1;
- pXinDraw = (PanoramiXRes *)
- SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
+ dixLookupResourceByClass((pointer*) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess);
}
#endif
@@ -3369,9 +3373,9 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- pXinDraw = (PanoramiXRes *)
- SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
- if (!pXinDraw) {
+ if (Success != dixLookupResourceByClass((pointer*) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess)) {
client->errorValue = drawId;
return __glXBadDrawable;
}
@@ -3533,9 +3537,10 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
#ifdef PANORAMIX
if (!noPanoramiXExtension) {
- PanoramiXRes *pXinDraw = (PanoramiXRes *)
- SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess);
- if (!pXinDraw) {
+ PanoramiXRes *pXinDraw;
+ if (Success != dixLookupResourceByClass((pointer*) &pXinDraw,
+ pDraw->id, XRC_DRAWABLE,
+ client, DixReadAccess)) {
client->errorValue = drawId;
return __glXBadDrawable;
}