From a48b83b9a2a7dfd31674e09537101a6f9174e864 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 17 Apr 2025 14:54:28 +0200 Subject: [PATCH] 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 --- dix/dixutils.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dix/dixutils.c b/dix/dixutils.c index a5cff7553..e3b3791d4 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -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; }