From a2baa34c11c2e7fb7cc90c3bb40698a33a5ce820 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 2 Jul 2024 17:51:56 +0200 Subject: [PATCH] Xext: dpms: 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/dpms.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Xext/dpms.c b/Xext/dpms.c index 01e8ec6c67..b47cf82e5f 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -312,10 +312,8 @@ ProcDPMSGetVersion(ClientPtr client) .minorVersion = SERVER_DPMS_MINOR_VERSION }; - if (client->swapped) { - swaps(&reply.majorVersion); - swaps(&reply.minorVersion); - } + REPLY_FIELD_CARD16(majorVersion); + REPLY_FIELD_CARD16(minorVersion); return X_SEND_REPLY_SIMPLE(client, reply); } @@ -343,11 +341,9 @@ ProcDPMSGetTimeouts(ClientPtr client) .off = DPMSOffTime / MILLI_PER_SECOND }; - if (client->swapped) { - swaps(&reply.standby); - swaps(&reply.suspend); - swaps(&reply.off); - } + REPLY_FIELD_CARD16(standby); + REPLY_FIELD_CARD16(suspend); + REPLY_FIELD_CARD16(off); return X_SEND_REPLY_SIMPLE(client, reply); } @@ -440,9 +436,7 @@ ProcDPMSInfo(ClientPtr client) .state = DPMSEnabled }; - if (client->swapped) { - swaps(&reply.power_level); - } + REPLY_FIELD_CARD16(power_level); return X_SEND_REPLY_SIMPLE(client, reply); }