From 74f2d68d35f65d5b834ad77c5d4b54beb806dbe0 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 17 Apr 2025 14:54:28 +0200 Subject: [PATCH] (!1918) 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 525b2d564..2713291a6 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; }