xcmisc: consolidate (S)ProcXCMiscGetXIDList()

Move conditional swapping of request fields into main request handler,
no extra swapped handler needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-07-16 04:58:13 +02:00
committed by Enrico Weigelt
parent 8ec51b64e8
commit f1263be6b7

View File

@@ -102,6 +102,9 @@ ProcXCMiscGetXIDList(ClientPtr client)
REQUEST(xXCMiscGetXIDListReq);
REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
if (client->swapped)
swapl(&stuff->count);
if (stuff->count > UINT32_MAX / sizeof(XID))
return BadAlloc;
@@ -153,16 +156,6 @@ ProcXCMiscDispatch(ClientPtr client)
}
}
static int _X_COLD
SProcXCMiscGetXIDList(ClientPtr client)
{
REQUEST(xXCMiscGetXIDListReq);
REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
swapl(&stuff->count);
return ProcXCMiscGetXIDList(client);
}
static int _X_COLD
SProcXCMiscDispatch(ClientPtr client)
{
@@ -173,7 +166,7 @@ SProcXCMiscDispatch(ClientPtr client)
case X_XCMiscGetXIDRange:
return ProcXCMiscGetXIDRange(client);
case X_XCMiscGetXIDList:
return SProcXCMiscGetXIDList(client);
return ProcXCMiscGetXIDList(client);
default:
return BadRequest;
}