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 <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2024-07-02 17:51:56 +02:00
parent aa697d6e7c
commit a2baa34c11

View File

@@ -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);
}