From a2b5e96882f7d0eefd9b780c990d62da659fbfe2 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 8 Jul 2024 15:20:03 +0200 Subject: [PATCH] Xext: xcmisc: use REPLY_*() macros for preparing / sending replies Use the new macros for preparing and sending replies to clients. Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/xcmisc.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index 5efca5257d..c121de26b4 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -57,6 +57,9 @@ ProcXCMiscGetVersion(ClientPtr client) .minorVersion = XCMiscMinorVersion }; + REPLY_FIELD_CARD16(majorVersion); + REPLY_FIELD_CARD16(minorVersion); + return X_SEND_REPLY_SIMPLE(client, reply); } @@ -72,10 +75,9 @@ ProcXCMiscGetXIDRange(ClientPtr client) .start_id = min_id, .count = max_id - min_id + 1 }; - if (client->swapped) { - swapl(&reply.start_id); - swapl(&reply.count); - } + + REPLY_FIELD_CARD32(start_id); + REPLY_FIELD_CARD32(count); return X_SEND_REPLY_SIMPLE(client, reply); } @@ -104,9 +106,8 @@ ProcXCMiscGetXIDList(ClientPtr client) xXCMiscGetXIDListReply reply = { .count = count }; - if (client->swapped) { - swapl(&reply.count); - } + + REPLY_FIELD_CARD32(count); return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf); }