summaryrefslogtreecommitdiff
path: root/dix/dispatch.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2009-04-29 01:04:37 -0400
committerEamon Walsh <ewalsh@tycho.nsa.gov>2009-04-29 01:04:37 -0400
commit57aff88c7d0761e590806d07bee1c9410680c89f (patch)
tree48f05f58a72183556af3b0a7f3f286959d7e096a /dix/dispatch.c
parent1abe0ee3da5e1268c7315f841d31337ea6524cf0 (diff)
Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
Diffstat (limited to 'dix/dispatch.c')
-rw-r--r--dix/dispatch.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 16a51bdc5..ce3294d32 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -1252,12 +1252,13 @@ int
ProcCloseFont(ClientPtr client)
{
FontPtr pFont;
+ int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
- pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
- DixDestroyAccess);
- if ( pFont != (FontPtr)NULL) /* id was valid */
+ rc = dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT,
+ client, DixDestroyAccess);
+ if (rc == Success)
{
FreeResource(stuff->id, RT_NONE);
return(client->noClientException);
@@ -1265,7 +1266,7 @@ ProcCloseFont(ClientPtr client)
else
{
client->errorValue = stuff->id;
- return (BadFont);
+ return (rc == BadValue) ? BadFont : rc;
}
}