summaryrefslogtreecommitdiff
path: root/Xext/dpms.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/dpms.c')
-rw-r--r--Xext/dpms.c60
1 files changed, 24 insertions, 36 deletions
diff --git a/Xext/dpms.c b/Xext/dpms.c
index 33a6e267c..0c8f18f47 100644
--- a/Xext/dpms.c
+++ b/Xext/dpms.c
@@ -46,7 +46,6 @@ ProcDPMSGetVersion(ClientPtr client)
{
/* REQUEST(xDPMSGetVersionReq); */
xDPMSGetVersionReply rep;
- int n;
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
@@ -56,9 +55,9 @@ ProcDPMSGetVersion(ClientPtr client)
rep.majorVersion = DPMSMajorVersion;
rep.minorVersion = DPMSMinorVersion;
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swaps(&rep.majorVersion, n);
- swaps(&rep.minorVersion, n);
+ swaps(&rep.sequenceNumber);
+ swaps(&rep.majorVersion);
+ swaps(&rep.minorVersion);
}
WriteToClient(client, sizeof(xDPMSGetVersionReply), (char *)&rep);
return Success;
@@ -69,7 +68,6 @@ ProcDPMSCapable(ClientPtr client)
{
/* REQUEST(xDPMSCapableReq); */
xDPMSCapableReply rep;
- int n;
REQUEST_SIZE_MATCH(xDPMSCapableReq);
@@ -79,7 +77,7 @@ ProcDPMSCapable(ClientPtr client)
rep.capable = DPMSCapableFlag;
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
+ swaps(&rep.sequenceNumber);
}
WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep);
return Success;
@@ -90,7 +88,6 @@ ProcDPMSGetTimeouts(ClientPtr client)
{
/* REQUEST(xDPMSGetTimeoutsReq); */
xDPMSGetTimeoutsReply rep;
- int n;
REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq);
@@ -102,10 +99,10 @@ ProcDPMSGetTimeouts(ClientPtr client)
rep.off = DPMSOffTime / MILLI_PER_SECOND;
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swaps(&rep.standby, n);
- swaps(&rep.suspend, n);
- swaps(&rep.off, n);
+ swaps(&rep.sequenceNumber);
+ swaps(&rep.standby);
+ swaps(&rep.suspend);
+ swaps(&rep.off);
}
WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *)&rep);
return Success;
@@ -195,7 +192,6 @@ ProcDPMSInfo(ClientPtr client)
{
/* REQUEST(xDPMSInfoReq); */
xDPMSInfoReply rep;
- int n;
REQUEST_SIZE_MATCH(xDPMSInfoReq);
@@ -206,8 +202,8 @@ ProcDPMSInfo(ClientPtr client)
rep.state = DPMSEnabled;
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swaps(&rep.power_level, n);
+ swaps(&rep.sequenceNumber);
+ swaps(&rep.power_level);
}
WriteToClient(client, sizeof(xDPMSInfoReply), (char *)&rep);
return Success;
@@ -244,13 +240,12 @@ ProcDPMSDispatch (ClientPtr client)
static int
SProcDPMSGetVersion(ClientPtr client)
{
- int n;
REQUEST(xDPMSGetVersionReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
- swaps(&stuff->majorVersion, n);
- swaps(&stuff->minorVersion, n);
+ swaps(&stuff->majorVersion);
+ swaps(&stuff->minorVersion);
return ProcDPMSGetVersion(client);
}
@@ -258,9 +253,8 @@ static int
SProcDPMSCapable(ClientPtr client)
{
REQUEST(xDPMSCapableReq);
- int n;
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSCapableReq);
return ProcDPMSCapable(client);
@@ -270,9 +264,8 @@ static int
SProcDPMSGetTimeouts(ClientPtr client)
{
REQUEST(xDPMSGetTimeoutsReq);
- int n;
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq);
return ProcDPMSGetTimeouts(client);
@@ -282,14 +275,13 @@ static int
SProcDPMSSetTimeouts(ClientPtr client)
{
REQUEST(xDPMSSetTimeoutsReq);
- int n;
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq);
- swaps(&stuff->standby, n);
- swaps(&stuff->suspend, n);
- swaps(&stuff->off, n);
+ swaps(&stuff->standby);
+ swaps(&stuff->suspend);
+ swaps(&stuff->off);
return ProcDPMSSetTimeouts(client);
}
@@ -297,9 +289,8 @@ static int
SProcDPMSEnable(ClientPtr client)
{
REQUEST(xDPMSEnableReq);
- int n;
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSEnableReq);
return ProcDPMSEnable(client);
@@ -309,9 +300,8 @@ static int
SProcDPMSDisable(ClientPtr client)
{
REQUEST(xDPMSDisableReq);
- int n;
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSDisableReq);
return ProcDPMSDisable(client);
@@ -321,12 +311,11 @@ static int
SProcDPMSForceLevel(ClientPtr client)
{
REQUEST(xDPMSForceLevelReq);
- int n;
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSForceLevelReq);
- swaps(&stuff->level, n);
+ swaps(&stuff->level);
return ProcDPMSForceLevel(client);
}
@@ -335,9 +324,8 @@ static int
SProcDPMSInfo(ClientPtr client)
{
REQUEST(xDPMSInfoReq);
- int n;
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSInfoReq);
return ProcDPMSInfo(client);