From b54ebcdc7599966920e027c2d34ec94feb8b9ec2 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 28 Aug 2024 14:22:31 +0200 Subject: [PATCH] (submit/glx-cleanups-vla) glx: DoQueryContext(): use core's swapping macros No need to have duplicated byte swapping macros in GLX for things that the core alreay provides. Using core's macros is actually even easier. Signed-off-by: Enrico Weigelt, metux IT consult --- glx/glxcmds.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/glx/glxcmds.c b/glx/glxcmds.c index c9520199f..21c431620 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -1686,12 +1686,10 @@ DoQueryContext(__GLXclientState * cl, GLXContextID gcId) sendBuf[9] = (int) (ctx->renderType); if (client->swapped) { - __GLX_DECLARE_SWAP_VARIABLES; - __GLX_DECLARE_SWAP_ARRAY_VARIABLES; - __GLX_SWAP_SHORT(&reply.sequenceNumber); - __GLX_SWAP_INT(&reply.length); - __GLX_SWAP_INT(&reply.n); - __GLX_SWAP_INT_ARRAY(sendBuf, sizeof(sendBuf) / sizeof(CARD32)); + swaps(&reply.sequenceNumber); + swapl(&reply.length); + swapl(&reply.n); + SwapLongs(sendBuf, sizeof(sendBuf) / 4); } WriteToClient(client, sizeof(xGLXQueryContextInfoEXTReply), &reply);