dix: dixLookupClient() align parameter naming with prototype
Align the function's parameter names with those defined in the prototype. Especially it makes code easier to understand if the result parameter is also named "result" here, as in the prototype. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
8e161ae771
commit
a48b83b9a2
|
@ -218,28 +218,28 @@ dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
|
dixLookupClient(ClientPtr *result, XID id, ClientPtr client, Mask access_mode)
|
||||||
{
|
{
|
||||||
void *pRes;
|
void *pRes;
|
||||||
int rc = BadValue, clientIndex = CLIENT_ID(rid);
|
int rc = BadValue, clientIndex = CLIENT_ID(id);
|
||||||
|
|
||||||
if (!clientIndex || !clients[clientIndex] || (rid & SERVER_BIT))
|
if (!clientIndex || !clients[clientIndex] || (id & SERVER_BIT))
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
rc = dixLookupResourceByClass(&pRes, rid, RC_ANY, client, DixGetAttrAccess);
|
rc = dixLookupResourceByClass(&pRes, id, RC_ANY, client, DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
rc = XaceHookClientAccess(client, clients[clientIndex], access);
|
rc = XaceHookClientAccess(client, clients[clientIndex], access_mode);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
*pClient = clients[clientIndex];
|
*result = clients[clientIndex];
|
||||||
return Success;
|
return Success;
|
||||||
bad:
|
bad:
|
||||||
if (client)
|
if (client)
|
||||||
client->errorValue = rid;
|
client->errorValue = id;
|
||||||
*pClient = NULL;
|
*result = NULL;
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue