shape: use X_SEND_REPLY_WITH_RPCBUF() macro

Use the new X_SEND_REPLY_WITH_RPCBUF() macro for final reply write out

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-08-14 20:02:33 +02:00
committed by Enrico Weigelt
parent 0b7194c9bc
commit 29005e9873

View File

@@ -1009,20 +1009,15 @@ ProcShapeGetRectangles(ClientPtr client)
return BadAlloc;
xShapeGetRectanglesReply rep = {
.type = X_Reply,
.ordering = YXBanded,
.sequenceNumber = client->sequence,
.length = x_rpcbuf_wsize_units(&rpcbuf),
.nrects = nrects
};
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swapl(&rep.nrects);
}
WriteToClient(client, sizeof(rep), &rep);
WriteRpcbufToClient(client, &rpcbuf);
X_SEND_REPLY_WITH_RPCBUF(client, rep, rpcbuf);
return Success;
}