damage: 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:
parent
52bf89e19f
commit
8ca929a021
|
@ -187,10 +187,7 @@ ProcDamageQueryVersion(ClientPtr client)
|
|||
REQUEST_FIELD_CARD32(minorVersion);
|
||||
|
||||
DamageClientPtr pDamageClient = GetDamageClient(client);
|
||||
xDamageQueryVersionReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
};
|
||||
xDamageQueryVersionReply rep = { 0 };
|
||||
|
||||
if (stuff->majorVersion < SERVER_DAMAGE_MAJOR_VERSION) {
|
||||
rep.majorVersion = stuff->majorVersion;
|
||||
|
@ -206,14 +203,10 @@ ProcDamageQueryVersion(ClientPtr client)
|
|||
}
|
||||
pDamageClient->major_version = rep.majorVersion;
|
||||
pDamageClient->minor_version = rep.minorVersion;
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swapl(&rep.majorVersion);
|
||||
swapl(&rep.minorVersion);
|
||||
}
|
||||
WriteToClient(client, sizeof(xDamageQueryVersionReply), &rep);
|
||||
return Success;
|
||||
|
||||
REPLY_FIELD_CARD32(majorVersion);
|
||||
REPLY_FIELD_CARD32(minorVersion);
|
||||
REPLY_SEND_RET_SUCCESS();
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue