diff options
author | Matt Turner <mattst88@gmail.com> | 2011-08-04 15:35:41 -0400 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2011-09-21 17:12:04 -0400 |
commit | 2c7c520cfe0df30f4bc3adba59d9c62582823bf8 (patch) | |
tree | f47282ce2f815acc691cfe188850adf8d6fbfcc3 /Xi/queryst.c | |
parent | c10bad3d3e8ff1b90014770fd470f9c67263e46f (diff) |
Use internal temp variable for swap macros
Also, fix whitespace, mainly around
swaps(&rep.sequenceNumber)
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'Xi/queryst.c')
-rw-r--r-- | Xi/queryst.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Xi/queryst.c b/Xi/queryst.c index 73af76d22..8c3bdcf97 100644 --- a/Xi/queryst.c +++ b/Xi/queryst.c @@ -56,10 +56,8 @@ from The Open Group. int SProcXQueryDeviceState(ClientPtr client) { - char n; - REQUEST(xQueryDeviceStateReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return (ProcXQueryDeviceState(client)); } @@ -72,7 +70,6 @@ SProcXQueryDeviceState(ClientPtr client) int ProcXQueryDeviceState(ClientPtr client) { - char n; int rc, i; int num_classes = 0; int total_length = 0; @@ -159,7 +156,7 @@ ProcXQueryDeviceState(ClientPtr client) *((int *)buf) = *values; values++; if (client->swapped) { - swapl((int *)buf, n); /* macro - braces needed */ + swapl((int *)buf); } buf += sizeof(int); } @@ -184,9 +181,7 @@ ProcXQueryDeviceState(ClientPtr client) void SRepXQueryDeviceState(ClientPtr client, int size, xQueryDeviceStateReply * rep) { - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); WriteToClient(client, size, (char *)rep); } |