summaryrefslogtreecommitdiff
path: root/Xext/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/sync.c')
-rw-r--r--Xext/sync.c186
1 files changed, 69 insertions, 117 deletions
diff --git a/Xext/sync.c b/Xext/sync.c
index 36dd27888..3b257f73b 100644
--- a/Xext/sync.c
+++ b/Xext/sync.c
@@ -1273,8 +1273,6 @@ static int
ProcSyncInitialize(ClientPtr client)
{
xSyncInitializeReply rep;
- int n;
-
REQUEST_SIZE_MATCH(xSyncInitializeReq);
memset(&rep, 0, sizeof(xSyncInitializeReply));
@@ -1286,7 +1284,7 @@ ProcSyncInitialize(ClientPtr client)
if (client->swapped)
{
- swaps(&rep.sequenceNumber, n);
+ swaps(&rep.sequenceNumber);
}
WriteToClient(client, sizeof(rep), (char *) &rep);
return Success;
@@ -1326,10 +1324,9 @@ ProcSyncListSystemCounters(ClientPtr client)
if (client->swapped)
{
- char n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.nCounters, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.nCounters);
}
for (i = 0; i < SyncNumSystemCounters; i++)
@@ -1346,11 +1343,10 @@ ProcSyncListSystemCounters(ClientPtr client)
if (client->swapped)
{
- char n;
- swapl(&walklist->counter, n);
- swapl(&walklist->resolution_hi, n);
- swapl(&walklist->resolution_lo, n);
- swaps(&walklist->name_length, n);
+ swapl(&walklist->counter);
+ swapl(&walklist->resolution_hi);
+ swapl(&walklist->resolution_lo);
+ swaps(&walklist->name_length);
}
pname_in_reply = ((char *)walklist) + sz_xSyncSystemCounter;
@@ -1433,9 +1429,8 @@ ProcSyncGetPriority(ClientPtr client)
if (client->swapped)
{
- char n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.priority, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.priority);
}
WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep);
@@ -1732,11 +1727,10 @@ ProcSyncQueryCounter(ClientPtr client)
rep.value_lo = XSyncValueLow32(pCounter->value);
if (client->swapped)
{
- char n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.value_hi, n);
- swapl(&rep.value_lo, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.value_hi);
+ swapl(&rep.value_lo);
}
WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep);
return Success;
@@ -1921,15 +1915,14 @@ ProcSyncQueryAlarm(ClientPtr client)
if (client->swapped)
{
- char n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.counter, n);
- swapl(&rep.wait_value_hi, n);
- swapl(&rep.wait_value_lo, n);
- swapl(&rep.test_type, n);
- swapl(&rep.delta_hi, n);
- swapl(&rep.delta_lo, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.counter);
+ swapl(&rep.wait_value_hi);
+ swapl(&rep.wait_value_lo);
+ swapl(&rep.test_type);
+ swapl(&rep.delta_hi);
+ swapl(&rep.delta_lo);
}
WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep);
@@ -2087,9 +2080,8 @@ ProcSyncQueryFence(ClientPtr client)
if (client->swapped)
{
- char n;
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
}
WriteToClient(client, sizeof(xSyncQueryFenceReply), (char *) &rep);
@@ -2242,9 +2234,7 @@ static int
SProcSyncInitialize(ClientPtr client)
{
REQUEST(xSyncInitializeReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncInitializeReq);
return ProcSyncInitialize(client);
@@ -2254,9 +2244,7 @@ static int
SProcSyncListSystemCounters(ClientPtr client)
{
REQUEST(xSyncListSystemCountersReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncListSystemCountersReq);
return ProcSyncListSystemCounters(client);
@@ -2266,13 +2254,11 @@ static int
SProcSyncCreateCounter(ClientPtr client)
{
REQUEST(xSyncCreateCounterReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncCreateCounterReq);
- swapl(&stuff->cid, n);
- swapl(&stuff->initial_value_lo, n);
- swapl(&stuff->initial_value_hi, n);
+ swapl(&stuff->cid);
+ swapl(&stuff->initial_value_lo);
+ swapl(&stuff->initial_value_hi);
return ProcSyncCreateCounter(client);
}
@@ -2281,13 +2267,11 @@ static int
SProcSyncSetCounter(ClientPtr client)
{
REQUEST(xSyncSetCounterReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncSetCounterReq);
- swapl(&stuff->cid, n);
- swapl(&stuff->value_lo, n);
- swapl(&stuff->value_hi, n);
+ swapl(&stuff->cid);
+ swapl(&stuff->value_lo);
+ swapl(&stuff->value_hi);
return ProcSyncSetCounter(client);
}
@@ -2296,13 +2280,11 @@ static int
SProcSyncChangeCounter(ClientPtr client)
{
REQUEST(xSyncChangeCounterReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncChangeCounterReq);
- swapl(&stuff->cid, n);
- swapl(&stuff->value_lo, n);
- swapl(&stuff->value_hi, n);
+ swapl(&stuff->cid);
+ swapl(&stuff->value_lo);
+ swapl(&stuff->value_hi);
return ProcSyncChangeCounter(client);
}
@@ -2311,11 +2293,9 @@ static int
SProcSyncQueryCounter(ClientPtr client)
{
REQUEST(xSyncQueryCounterReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncQueryCounterReq);
- swapl(&stuff->counter, n);
+ swapl(&stuff->counter);
return ProcSyncQueryCounter(client);
}
@@ -2324,11 +2304,9 @@ static int
SProcSyncDestroyCounter(ClientPtr client)
{
REQUEST(xSyncDestroyCounterReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncDestroyCounterReq);
- swapl(&stuff->counter, n);
+ swapl(&stuff->counter);
return ProcSyncDestroyCounter(client);
}
@@ -2337,9 +2315,7 @@ static int
SProcSyncAwait(ClientPtr client)
{
REQUEST(xSyncAwaitReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSyncAwaitReq);
SwapRestL(stuff);
@@ -2350,12 +2326,10 @@ static int
SProcSyncCreateAlarm(ClientPtr client)
{
REQUEST(xSyncCreateAlarmReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq);
- swapl(&stuff->id, n);
- swapl(&stuff->valueMask, n);
+ swapl(&stuff->id);
+ swapl(&stuff->valueMask);
SwapRestL(stuff);
return ProcSyncCreateAlarm(client);
@@ -2365,12 +2339,10 @@ static int
SProcSyncChangeAlarm(ClientPtr client)
{
REQUEST(xSyncChangeAlarmReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq);
- swapl(&stuff->alarm, n);
- swapl(&stuff->valueMask, n);
+ swapl(&stuff->alarm);
+ swapl(&stuff->valueMask);
SwapRestL(stuff);
return ProcSyncChangeAlarm(client);
}
@@ -2379,11 +2351,9 @@ static int
SProcSyncQueryAlarm(ClientPtr client)
{
REQUEST(xSyncQueryAlarmReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncQueryAlarmReq);
- swapl(&stuff->alarm, n);
+ swapl(&stuff->alarm);
return ProcSyncQueryAlarm(client);
}
@@ -2392,11 +2362,9 @@ static int
SProcSyncDestroyAlarm(ClientPtr client)
{
REQUEST(xSyncDestroyAlarmReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncDestroyAlarmReq);
- swapl(&stuff->alarm, n);
+ swapl(&stuff->alarm);
return ProcSyncDestroyAlarm(client);
}
@@ -2405,12 +2373,10 @@ static int
SProcSyncSetPriority(ClientPtr client)
{
REQUEST(xSyncSetPriorityReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncSetPriorityReq);
- swapl(&stuff->id, n);
- swapl(&stuff->priority, n);
+ swapl(&stuff->id);
+ swapl(&stuff->priority);
return ProcSyncSetPriority(client);
}
@@ -2419,11 +2385,9 @@ static int
SProcSyncGetPriority(ClientPtr client)
{
REQUEST(xSyncGetPriorityReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncGetPriorityReq);
- swapl(&stuff->id, n);
+ swapl(&stuff->id);
return ProcSyncGetPriority(client);
}
@@ -2432,11 +2396,9 @@ static int
SProcSyncCreateFence(ClientPtr client)
{
REQUEST(xSyncCreateFenceReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncCreateFenceReq);
- swapl(&stuff->fid, n);
+ swapl(&stuff->fid);
return ProcSyncCreateFence(client);
}
@@ -2445,11 +2407,9 @@ static int
SProcSyncTriggerFence(ClientPtr client)
{
REQUEST(xSyncTriggerFenceReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncTriggerFenceReq);
- swapl(&stuff->fid, n);
+ swapl(&stuff->fid);
return ProcSyncTriggerFence(client);
}
@@ -2458,11 +2418,9 @@ static int
SProcSyncResetFence(ClientPtr client)
{
REQUEST(xSyncResetFenceReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncResetFenceReq);
- swapl(&stuff->fid, n);
+ swapl(&stuff->fid);
return ProcSyncResetFence(client);
}
@@ -2471,11 +2429,9 @@ static int
SProcSyncDestroyFence(ClientPtr client)
{
REQUEST(xSyncDestroyFenceReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncDestroyFenceReq);
- swapl(&stuff->fid, n);
+ swapl(&stuff->fid);
return ProcSyncDestroyFence(client);
}
@@ -2484,11 +2440,9 @@ static int
SProcSyncQueryFence(ClientPtr client)
{
REQUEST(xSyncQueryFenceReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH (xSyncQueryFenceReq);
- swapl(&stuff->fid, n);
+ swapl(&stuff->fid);
return ProcSyncQueryFence(client);
}
@@ -2497,9 +2451,7 @@ static int
SProcSyncAwaitFence(ClientPtr client)
{
REQUEST(xSyncAwaitFenceReq);
- char n;
-
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq);
SwapRestL(stuff);