diff options
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/panoramiXprocs.c | 18 | ||||
-rw-r--r-- | Xext/shape.c | 14 | ||||
-rw-r--r-- | Xext/xprint.c | 7 |
3 files changed, 20 insertions, 19 deletions
diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index a193c4188..1c53a1e1a 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -577,19 +577,17 @@ int PanoramiXTranslateCoords(ClientPtr client) { INT16 x, y; REQUEST(xTranslateCoordsReq); - - register WindowPtr pWin, pDst; + int rc; + WindowPtr pWin, pDst; xTranslateCoordsReply rep; REQUEST_SIZE_MATCH(xTranslateCoordsReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->srcWid, client, - DixReadAccess); - if (!pWin) - return(BadWindow); - pDst = (WindowPtr)SecurityLookupWindow(stuff->dstWid, client, - DixReadAccess); - if (!pDst) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixReadAccess); + if (rc != Success) + return rc; + rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixReadAccess); + if (rc != Success) + return rc; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; diff --git a/Xext/shape.c b/Xext/shape.c index 58e3a69b3..928eeee31 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -419,12 +419,13 @@ ProcShapeMask (client) RegionPtr *destRgn; PixmapPtr pPixmap; CreateDftPtr createDefault; + int rc; REQUEST_SIZE_MATCH (xShapeMaskReq); UpdateCurrentTime(); - pWin = SecurityLookupWindow (stuff->dest, client, DixWriteAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->dest, client, DixWriteAccess); + if (rc != Success) + return rc; switch (stuff->destKind) { case ShapeBounding: createDefault = CreateBoundingShape; @@ -822,11 +823,12 @@ ProcShapeSelectInput (client) WindowPtr pWin; ShapeEventPtr pShapeEvent, pNewShapeEvent, *pHead; XID clientResource; + int rc; REQUEST_SIZE_MATCH (xShapeSelectInputReq); - pWin = SecurityLookupWindow (stuff->window, client, DixWriteAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; pHead = (ShapeEventPtr *)SecurityLookupIDByType(client, pWin->drawable.id, EventType, DixWriteAccess); switch (stuff->enable) { diff --git a/Xext/xprint.c b/Xext/xprint.c index 669ad277d..d8fc51713 100644 --- a/Xext/xprint.c +++ b/Xext/xprint.c @@ -1852,9 +1852,10 @@ ProcXpStartPage(ClientPtr client) if(pContext->state & PAGE_STARTED) return XpErrorBase+XPBadSequence; - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - DixWriteAccess); - if (!pWin || pWin->drawable.pScreen->myNum != pContext->screenNum) + result = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (result != Success) + return result; + if (pWin->drawable.pScreen->myNum != pContext->screenNum) return BadWindow; if((c = (XpStPagePtr)xalloc(sizeof(XpStPageRec))) == (XpStPagePtr)NULL) |