diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-04 16:37:55 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-04 16:37:55 +0200 |
commit | 27b0b5723ccbcc92bbcc80dff8fb698b69e74944 (patch) | |
tree | 3b27e6dd17a7d4d00266819545ae97defa11cf81 /nx-X11/programs/Xserver/os | |
parent | d1d859dfdec4b4665e06401383ab71926e4e731c (diff) | |
parent | 286d83260216e8e53db701eed5c785aae1c716bf (diff) | |
download | nx-libs-27b0b5723ccbcc92bbcc80dff8fb698b69e74944.tar.gz nx-libs-27b0b5723ccbcc92bbcc80dff8fb698b69e74944.tar.bz2 nx-libs-27b0b5723ccbcc92bbcc80dff8fb698b69e74944.zip |
Merge branch 'sunweaver-pr/type-safe-swapping' into 3.6.x
Attributes GH PR #167: https://github.com/ArcticaProject/nx-libs/pull/167
Reviewed by: Vadim Troshchinskiy <vadim@qindel.com> -- Mon, 04 Jul 2016 07:31:50 -0700
Diffstat (limited to 'nx-X11/programs/Xserver/os')
-rw-r--r-- | nx-X11/programs/Xserver/os/connection.c | 6 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/os/io.c | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/nx-X11/programs/Xserver/os/connection.c b/nx-X11/programs/Xserver/os/connection.c index 15321458e..fd9741389 100644 --- a/nx-X11/programs/Xserver/os/connection.c +++ b/nx-X11/programs/Xserver/os/connection.c @@ -933,9 +933,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/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c index d0862ddd4..234ce8b58 100644 --- a/nx-X11/programs/Xserver/os/io.c +++ b/nx-X11/programs/Xserver/os/io.c @@ -591,8 +591,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); } } #endif @@ -948,11 +947,10 @@ WriteToClient (ClientPtr who, int count, char *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; |