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.

Reviewed-by: Yusuf Khan <yusisamerican@gmail.com>
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-04-17 14:54:28 +02:00
parent 37b7ea8f8a
commit e366a4e4ce

View File

@@ -218,28 +218,28 @@ dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access)
}
int
dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
dixLookupClient(ClientPtr *result, XID id, ClientPtr client, Mask access_mode)
{
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;
rc = dixLookupResourceByClass(&pRes, rid, RC_ANY, client, DixGetAttrAccess);
rc = dixLookupResourceByClass(&pRes, id, RC_ANY, client, DixGetAttrAccess);
if (rc != Success)
goto bad;
rc = XaceHookClientAccess(client, clients[clientIndex], access);
rc = XaceHookClientAccess(client, clients[clientIndex], access_mode);
if (rc != Success)
goto bad;
*pClient = clients[clientIndex];
*result = clients[clientIndex];
return Success;
bad:
if (client)
client->errorValue = rid;
*pClient = NULL;
client->errorValue = id;
*result = NULL;
return rc;
}