From 3a76d12ef061a0487c95b4daf58bacc79c432d34 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 11 Jun 2025 13:40:33 -0700 Subject: [PATCH] Revert "randr: ProcRRGetProviderProperty(): use SwapShort()/SwapLong()" This reverts commit 62b849799983d6154261c6662d5d8c40fafa67f4. Part-of: --- randr/rrproviderproperty.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/randr/rrproviderproperty.c b/randr/rrproviderproperty.c index 23a105c02..45e9a63e6 100644 --- a/randr/rrproviderproperty.c +++ b/randr/rrproviderproperty.c @@ -685,26 +685,24 @@ ProcRRGetProviderProperty(ClientPtr client) swapl(&reply.bytesAfter); swapl(&reply.nItems); } + WriteToClient(client, sizeof(xGenericReply), &reply); if (len) { memcpy(extra, (char *) prop_value->data + ind, len); switch (reply.format) { case 32: - if (client->swapped) - SwapLongs((CARD32*) extra, len/sizeof(CARD32)); + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; break; case 16: - if (client->swapped) - SwapShorts((short*) extra, len/sizeof(CARD16)); + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; break; default: + client->pSwapReplyFunc = (ReplySwapPtr) WriteToClient; break; } + WriteSwappedDataToClient(client, len, extra); + free(extra); } - WriteToClient(client, sizeof(xGenericReply), &reply); - WriteToClient(client, len, extra); - free(extra); - if (stuff->delete && (reply.bytesAfter == 0)) { /* delete the Property */ *prev = prop->next; RRDestroyProviderProperty(prop);