Xext: geext: use REPLY_*() macros for preparing / sending replies

Use the new macros for preparing and sending replies to clients.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-07-03 22:11:25 +02:00
parent ff1cb0df89
commit 03b8cb506f

View File

@ -73,15 +73,9 @@ ProcGEQueryVersion(ClientPtr client)
REQUEST_FIELD_CARD16(minorVersion);
GEClientInfoPtr pGEClient = GEGetClient(client);
xGEQueryVersionReply rep;
rep = (xGEQueryVersionReply) {
.repType = X_Reply,
xGEQueryVersionReply rep = {
.RepType = X_GEQueryVersion,
.sequenceNumber = client->sequence,
.length = 0,
/* return the supported version by the server */
.majorVersion = SERVER_GE_MAJOR_VERSION,
.minorVersion = SERVER_GE_MINOR_VERSION
};
@ -90,15 +84,9 @@ ProcGEQueryVersion(ClientPtr client)
pGEClient->major_version = stuff->majorVersion;
pGEClient->minor_version = stuff->minorVersion;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
WriteToClient(client, sizeof(xGEQueryVersionReply), &rep);
return Success;
REPLY_FIELD_CARD16(majorVersion);
REPLY_FIELD_CARD16(minorVersion);
REPLY_SEND_RET_SUCCESS();
}
/************************************************************/