Replace SecurityLookupIDByType() with dixLookupResourceByType(), take 1.
This patch has been prepared with the following Coccinelle semantic patch: @@ expression a, b, c, d; identifier r; @@ -r = SecurityLookupIDByType(a, b, c, d); +dixLookupResourceByType((pointer*) &r, b, c, a, d); Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org>
This commit is contained in:
parent
28b4c02d74
commit
ac04c1377a
|
@ -271,9 +271,11 @@ static int dmxProcRenderCreateGlyphSet(ClientPtr client)
|
||||||
/* Look up glyphSet that was just created ???? */
|
/* Look up glyphSet that was just created ???? */
|
||||||
/* Store glyphsets from backends in glyphSet->devPrivate ????? */
|
/* Store glyphsets from backends in glyphSet->devPrivate ????? */
|
||||||
/* Make sure we handle all errors here!! */
|
/* Make sure we handle all errors here!! */
|
||||||
|
|
||||||
glyphSet = SecurityLookupIDByType(client, stuff->gsid, GlyphSetType,
|
dixLookupResourceByType((pointer*) &glyphSet,
|
||||||
DixDestroyAccess);
|
stuff->gsid, GlyphSetType,
|
||||||
|
client, DixDestroyAccess);
|
||||||
|
|
||||||
glyphPriv = malloc(sizeof(dmxGlyphPrivRec));
|
glyphPriv = malloc(sizeof(dmxGlyphPrivRec));
|
||||||
if (!glyphPriv) return BadAlloc;
|
if (!glyphPriv) return BadAlloc;
|
||||||
glyphPriv->glyphSets = NULL;
|
glyphPriv->glyphSets = NULL;
|
||||||
|
@ -314,8 +316,9 @@ static int dmxProcRenderFreeGlyphSet(ClientPtr client)
|
||||||
REQUEST(xRenderFreeGlyphSetReq);
|
REQUEST(xRenderFreeGlyphSetReq);
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
|
REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq);
|
||||||
glyphSet = SecurityLookupIDByType(client, stuff->glyphset, GlyphSetType,
|
dixLookupResourceByType((pointer*) &glyphSet,
|
||||||
DixDestroyAccess);
|
stuff->glyphset, GlyphSetType,
|
||||||
|
client, DixDestroyAccess);
|
||||||
|
|
||||||
if (glyphSet && glyphSet->refcnt == 1) {
|
if (glyphSet && glyphSet->refcnt == 1) {
|
||||||
dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
|
dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
|
||||||
|
@ -357,8 +360,9 @@ static int dmxProcRenderAddGlyphs(ClientPtr client)
|
||||||
CARD8 *bits;
|
CARD8 *bits;
|
||||||
int nbytes;
|
int nbytes;
|
||||||
|
|
||||||
glyphSet = SecurityLookupIDByType(client, stuff->glyphset,
|
dixLookupResourceByType((pointer*) &glyphSet,
|
||||||
GlyphSetType, DixReadAccess);
|
stuff->glyphset, GlyphSetType,
|
||||||
|
client, DixReadAccess);
|
||||||
glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
|
glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
|
||||||
|
|
||||||
nglyphs = stuff->nglyphs;
|
nglyphs = stuff->nglyphs;
|
||||||
|
@ -400,8 +404,9 @@ static int dmxProcRenderFreeGlyphs(ClientPtr client)
|
||||||
REQUEST(xRenderFreeGlyphsReq);
|
REQUEST(xRenderFreeGlyphsReq);
|
||||||
|
|
||||||
REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
|
REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq);
|
||||||
glyphSet = SecurityLookupIDByType(client, stuff->glyphset, GlyphSetType,
|
dixLookupResourceByType((pointer*) &glyphSet,
|
||||||
DixWriteAccess);
|
stuff->glyphset, GlyphSetType,
|
||||||
|
client, DixWriteAccess);
|
||||||
|
|
||||||
if (glyphSet) {
|
if (glyphSet) {
|
||||||
dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
|
dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
|
||||||
|
@ -472,14 +477,18 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
|
||||||
GlyphSetPtr glyphSet;
|
GlyphSetPtr glyphSet;
|
||||||
dmxGlyphPrivPtr glyphPriv;
|
dmxGlyphPrivPtr glyphPriv;
|
||||||
|
|
||||||
pSrc = SecurityLookupIDByType(client, stuff->src, PictureType,
|
dixLookupResourceByType((pointer*) &pSrc,
|
||||||
DixReadAccess);
|
stuff->src, PictureType,
|
||||||
|
client, DixReadAccess);
|
||||||
|
|
||||||
pSrcPriv = DMX_GET_PICT_PRIV(pSrc);
|
pSrcPriv = DMX_GET_PICT_PRIV(pSrc);
|
||||||
if (!pSrcPriv->pict)
|
if (!pSrcPriv->pict)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
pDst = SecurityLookupIDByType(client, stuff->dst, PictureType,
|
dixLookupResourceByType((pointer*) &pDst,
|
||||||
DixWriteAccess);
|
stuff->dst, PictureType,
|
||||||
|
client, DixWriteAccess);
|
||||||
|
|
||||||
pDstPriv = DMX_GET_PICT_PRIV(pDst);
|
pDstPriv = DMX_GET_PICT_PRIV(pDst);
|
||||||
if (!pDstPriv->pict)
|
if (!pDstPriv->pict)
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -495,8 +504,9 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (stuff->maskFormat)
|
if (stuff->maskFormat)
|
||||||
pFmt = SecurityLookupIDByType(client, stuff->maskFormat,
|
dixLookupResourceByType((pointer*) &pFmt,
|
||||||
PictFormatType, DixReadAccess);
|
stuff->maskFormat, PictFormatType,
|
||||||
|
client, DixReadAccess);
|
||||||
else
|
else
|
||||||
pFmt = NULL;
|
pFmt = NULL;
|
||||||
|
|
||||||
|
@ -546,8 +556,9 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
|
||||||
curGlyph = glyphs;
|
curGlyph = glyphs;
|
||||||
curElt = elts;
|
curElt = elts;
|
||||||
|
|
||||||
glyphSet = SecurityLookupIDByType(client, stuff->glyphset,
|
dixLookupResourceByType((pointer*) &glyphSet,
|
||||||
GlyphSetType, DixReadAccess);
|
stuff->glyphset, GlyphSetType,
|
||||||
|
client, DixReadAccess);
|
||||||
glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
|
glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
|
||||||
|
|
||||||
while (buffer + sizeof(xGlyphElt) < end) {
|
while (buffer + sizeof(xGlyphElt) < end) {
|
||||||
|
@ -555,10 +566,11 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client)
|
||||||
buffer += sizeof(xGlyphElt);
|
buffer += sizeof(xGlyphElt);
|
||||||
|
|
||||||
if (elt->len == 0xff) {
|
if (elt->len == 0xff) {
|
||||||
glyphSet = SecurityLookupIDByType(client,
|
dixLookupResourceByType((pointer*) &glyphSet,
|
||||||
*((CARD32 *)buffer),
|
*((CARD32 *)buffer),
|
||||||
GlyphSetType,
|
GlyphSetType,
|
||||||
DixReadAccess);
|
client,
|
||||||
|
DixReadAccess);
|
||||||
glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
|
glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet);
|
||||||
buffer += 4;
|
buffer += 4;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user