mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-26 23:25:08 +00:00
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:
18
Xext/dpms.c
18
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user