From 6372a1e28a1bba4a22fcd84ed33c5e21c2d772a1 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 29 Aug 2025 16:32:44 +0200 Subject: [PATCH] present: use X_SEND_REPLY_SIMPLE() Signed-off-by: Enrico Weigelt, metux IT consult --- present/present_request.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/present/present_request.c b/present/present_request.c index 49b0d92f1c..8f5814c0b9 100644 --- a/present/present_request.c +++ b/present/present_request.c @@ -33,9 +33,6 @@ proc_present_query_version(ClientPtr client) { REQUEST(xPresentQueryVersionReq); xPresentQueryVersionReply rep = { - .type = X_Reply, - .sequenceNumber = client->sequence, - .length = 0, .majorVersion = SERVER_PRESENT_MAJOR_VERSION, .minorVersion = SERVER_PRESENT_MINOR_VERSION }; @@ -55,13 +52,11 @@ proc_present_query_version(ClientPtr client) } if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); swapl(&rep.majorVersion); swapl(&rep.minorVersion); } - WriteToClient(client, sizeof(rep), &rep); - return Success; + + return X_SEND_REPLY_SIMPLE(client, rep); } #define VERIFY_FENCE_OR_NONE(fence_ptr, fence_id, client, access) do { \ @@ -255,11 +250,6 @@ static int proc_present_query_capabilities (ClientPtr client) { REQUEST(xPresentQueryCapabilitiesReq); - xPresentQueryCapabilitiesReply rep = { - .type = X_Reply, - .sequenceNumber = client->sequence, - .length = 0, - }; WindowPtr window; RRCrtcPtr crtc = NULL; int r; @@ -277,15 +267,14 @@ proc_present_query_capabilities (ClientPtr client) return r; } - rep.capabilities = present_query_capabilities(crtc); + xPresentQueryCapabilitiesReply rep = { + .capabilities = present_query_capabilities(crtc) + }; if (client->swapped) { - swaps(&rep.sequenceNumber); - swapl(&rep.length); swapl(&rep.capabilities); } - WriteToClient(client, sizeof(rep), &rep); - return Success; + return X_SEND_REPLY_SIMPLE(client, rep); } #ifdef DRI3