These occurrences are a bit harder to catch through a semantic patch, so process them “manually”, trying to adapt to the local style in ProcDMXForceWindowCreation() and dmxPopulatePanoramiX().
Signed-off-by: Cyril Brulebois <[email protected]> --- hw/dmx/dmx.c | 10 ++++++---- hw/dmx/glxProxy/glxcmds.c | 7 ++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c index 1dee077..5761eaa 100644 --- a/hw/dmx/dmx.c +++ b/hw/dmx/dmx.c @@ -231,8 +231,9 @@ static int ProcDMXForceWindowCreation(ClientPtr client) PanoramiXRes *win; int i; - if (!(win = SecurityLookupIDByType(client, stuff->window, XRT_WINDOW, - DixReadAccess))) + if (Success != dixLookupResourceByType((pointer) &win, + stuff->window, XRT_WINDOW, + client, DixReadAccess)) return -1; /* BadWindow */ FOR_NSCREENS(i) { @@ -506,8 +507,9 @@ static int dmxPopulatePanoramiX(ClientPtr client, Window window, int count = 0; DMXWindowAttributesRec attr; - if (!(win = SecurityLookupIDByType(client, window, XRT_WINDOW, - DixReadAccess))) + if (Success != dixLookupResourceByType((pointer) &win, + window, XRT_WINDOW, + client, DixReadAccess)) return -1; /* BadWindow */ FOR_NSCREENS(i) { diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c index 989b6a4..e0d02d0 100644 --- a/hw/dmx/glxProxy/glxcmds.c +++ b/hw/dmx/glxProxy/glxcmds.c @@ -3074,9 +3074,14 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) int nProps; int *sendBuf, *pSendBuf; int nReplyBytes; + int lookup_ret; req = (xGLXQueryContextInfoEXTReq *)pc; - ctx = (__GLXcontext *) SecurityLookupIDByType(client, req->context, __glXContextRes, DixReadAccess); + lookup_ret = dixLookupResourceByType((pointer) &ctx, + req->context, __glXContextRes, + client, DixReadAccess); + ctx = (lookup_ret == Success) ? ctx : NULL; + if (!ctx) { client->errorValue = req->context; return __glXBadContext; -- 1.7.2.3 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
