From 0f0d95d50aea832eef26f3b854b1146a0f434b59 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Thu, 21 Aug 2025 19:13:14 +0200 Subject: [PATCH] xext: xv: use X_SEND_REPLY_SIMPLE() Use X_SEND_REPLY_SIMPLE() for sending out simple replies. Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/xvdisp.c | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 0863714aff..07953da9d3 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -62,21 +62,16 @@ ProcXvQueryExtension(ClientPtr client) REQUEST_SIZE_MATCH(xvQueryExtensionReq); xvQueryExtensionReply rep = { - .type = X_Reply, - .sequenceNumber = client->sequence, - .length = 0, .version = XvVersion, .revision = XvRevision }; if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); swaps(&rep.version); swaps(&rep.revision); } - WriteToClient(client, sizeof(rep), &rep); + X_SEND_REPLY_SIMPLE(client, rep); return Success; } @@ -389,18 +384,10 @@ ProcXvGrabPort(ClientPtr client) return status; } xvGrabPortReply rep = { - .type = X_Reply, - .sequenceNumber = client->sequence, .result = result }; - if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); - } - - WriteToClient(client, sz_xvGrabPortReply, &rep); - + X_SEND_REPLY_SIMPLE(client, rep); return Success; } @@ -511,18 +498,14 @@ ProcXvGetPortAttribute(ClientPtr client) } xvGetPortAttributeReply rep = { - .type = X_Reply, - .sequenceNumber = client->sequence, .value = value }; if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); swapl(&rep.value); } - WriteToClient(client, sz_xvGetPortAttributeReply, &rep); + X_SEND_REPLY_SIMPLE(client, rep); return Success; } @@ -543,20 +526,16 @@ ProcXvQueryBestSize(ClientPtr client) &actual_width, &actual_height); xvQueryBestSizeReply rep = { - .type = X_Reply, - .sequenceNumber = client->sequence, .actual_width = actual_width, .actual_height = actual_height }; if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); swaps(&rep.actual_width); swaps(&rep.actual_height); } - WriteToClient(client, sz_xvQueryBestSizeReply, &rep); + X_SEND_REPLY_SIMPLE(client, rep); return Success; }