From c8c52387c59c6426bd947b7268397ccda9334ccf Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 15 Jul 2025 05:33:38 +0200 Subject: [PATCH] xv: inline SWriteListImageFormatsReply() Instead of complex macro machinery, just move the conditional swapping directly into ProcXvListImageFormats (). Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/xvdisp.c | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index c56482b18f..53fcfeb740 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -54,22 +54,6 @@ SOFTWARE. unsigned long XvXRTPort; #endif /* XINERAMA */ -static int -SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - swapl(&rep->num_formats); - - WriteToClient(client, sz_xvListImageFormatsReply, rep); - - return Success; -} - -#define _WriteListImageFormatsReply(_c,_d) \ - if ((_c)->swapped) SWriteListImageFormatsReply(_c, _d); \ - else WriteToClient(_c, sz_xvListImageFormatsReply, _d) - static int ProcXvQueryExtension(ClientPtr client) { @@ -946,7 +930,13 @@ ProcXvListImageFormats(ClientPtr client) bytes_to_int32(pPort->pAdaptor->nImages * sz_xvImageFormatInfo) }; - _WriteListImageFormatsReply(client, &rep); + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.num_formats); + } + + WriteToClient(client, sz_xvListImageFormatsReply, &rep); pImage = pPort->pAdaptor->pImages;