Xext: geext: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros

Use the new macros to make request struct parsing / field swapping
much easier.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-07-03 20:02:59 +02:00 committed by Enrico Weigelt
parent 2e6a9a1fbc
commit 6f7aa46c51

View File

@ -67,16 +67,12 @@ static void SGEGenericEvent(xEvent *from, xEvent *to);
static int
ProcGEQueryVersion(ClientPtr client)
{
X_REQUEST_HEAD_STRUCT(xGEQueryVersionReq);
X_REQUEST_FIELD_CARD16(majorVersion);
X_REQUEST_FIELD_CARD16(minorVersion);
GEClientInfoPtr pGEClient = GEGetClient(client);
REQUEST(xGEQueryVersionReq);
REQUEST_SIZE_MATCH(xGEQueryVersionReq);
if (client->swapped) {
swaps(&stuff->majorVersion);
swaps(&stuff->minorVersion);
}
xGEQueryVersionReply reply = {
.RepType = X_GEQueryVersion,
/* return the supported version by the server */