From 2c7c520cfe0df30f4bc3adba59d9c62582823bf8 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 4 Aug 2011 15:35:41 -0400 Subject: Use internal temp variable for swap macros Also, fix whitespace, mainly around swaps(&rep.sequenceNumber) Reviewed-by: Peter Harris Signed-off-by: Matt Turner --- Xi/queryst.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'Xi/queryst.c') 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); } -- cgit v1.2.3