summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2011-08-04 15:35:41 -0400
committerMatt Turner <mattst88@gmail.com>2011-09-21 17:12:04 -0400
commit2c7c520cfe0df30f4bc3adba59d9c62582823bf8 (patch)
treef47282ce2f815acc691cfe188850adf8d6fbfcc3 /os
parentc10bad3d3e8ff1b90014770fd470f9c67263e46f (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 'os')
-rw-r--r--os/connection.c6
-rw-r--r--os/io.c6
2 files changed, 5 insertions, 7 deletions
diff --git a/os/connection.c b/os/connection.c
index 0c580ab5e..b339f4e96 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -905,9 +905,9 @@ ErrorConnMax(XtransConnInfo trans_conn)
if (((*(char *) &whichbyte) && (byteOrder == 'B')) ||
(!(*(char *) &whichbyte) && (byteOrder == 'l')))
{
- swaps(&csp.majorVersion, whichbyte);
- swaps(&csp.minorVersion, whichbyte);
- swaps(&csp.length, whichbyte);
+ swaps(&csp.majorVersion);
+ swaps(&csp.minorVersion);
+ swaps(&csp.length);
}
iov[0].iov_len = sz_xConnSetupPrefix;
iov[0].iov_base = (char *) &csp;
diff --git a/os/io.c b/os/io.c
index 421023807..068f5f028 100644
--- a/os/io.c
+++ b/os/io.c
@@ -598,8 +598,7 @@ ResetCurrentRequest(ClientPtr client)
((xBigReq *)oci->bufptr)->length = client->req_len;
if (client->swapped)
{
- char n;
- swapl(&((xBigReq *)oci->bufptr)->length, n);
+ swapl(&((xBigReq *)oci->bufptr)->length);
}
}
if (gotnow >= (needed << 2))
@@ -822,11 +821,10 @@ WriteToClient (ClientPtr who, int count, const void *__buf)
{ /* start of new reply */
CARD32 replylen;
unsigned long bytesleft;
- char n;
replylen = ((xGenericReply *)buf)->length;
if (who->swapped)
- swapl(&replylen, n);
+ swapl(&replylen);
bytesleft = (replylen * 4) + SIZEOF(xReply) - count - padBytes;
replyinfo.startOfReply = TRUE;
replyinfo.bytesRemaining = who->replyBytesRemaining = bytesleft;