aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xext/xcmisc.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-04 16:37:55 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-04 16:37:55 +0200
commit27b0b5723ccbcc92bbcc80dff8fb698b69e74944 (patch)
tree3b27e6dd17a7d4d00266819545ae97defa11cf81 /nx-X11/programs/Xserver/Xext/xcmisc.c
parentd1d859dfdec4b4665e06401383ab71926e4e731c (diff)
parent286d83260216e8e53db701eed5c785aae1c716bf (diff)
downloadnx-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/Xext/xcmisc.c')
-rw-r--r--nx-X11/programs/Xserver/Xext/xcmisc.c36
1 files changed, 15 insertions, 21 deletions
diff --git a/nx-X11/programs/Xserver/Xext/xcmisc.c b/nx-X11/programs/Xserver/Xext/xcmisc.c
index 7021ed47e..bca5bca34 100644
--- a/nx-X11/programs/Xserver/Xext/xcmisc.c
+++ b/nx-X11/programs/Xserver/Xext/xcmisc.c
@@ -98,7 +98,6 @@ ProcXCMiscGetVersion(client)
register ClientPtr client;
{
xXCMiscGetVersionReply rep;
- register int n;
REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
rep.type = X_Reply;
@@ -107,9 +106,9 @@ ProcXCMiscGetVersion(client)
rep.majorVersion = XCMiscMajorVersion;
rep.minorVersion = XCMiscMinorVersion;
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swaps(&rep.majorVersion, n);
- swaps(&rep.minorVersion, n);
+ swaps(&rep.sequenceNumber);
+ swaps(&rep.majorVersion);
+ swaps(&rep.minorVersion);
}
WriteToClient(client, sizeof(xXCMiscGetVersionReply), (char *)&rep);
return(client->noClientException);
@@ -120,7 +119,6 @@ ProcXCMiscGetXIDRange(client)
register ClientPtr client;
{
xXCMiscGetXIDRangeReply rep;
- register int n;
XID min_id, max_id;
REQUEST_SIZE_MATCH(xXCMiscGetXIDRangeReq);
@@ -131,9 +129,9 @@ ProcXCMiscGetXIDRange(client)
rep.start_id = min_id;
rep.count = max_id - min_id + 1;
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.start_id, n);
- swapl(&rep.count, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.start_id);
+ swapl(&rep.count);
}
WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), (char *)&rep);
return(client->noClientException);
@@ -145,7 +143,6 @@ ProcXCMiscGetXIDList(client)
{
REQUEST(xXCMiscGetXIDListReq);
xXCMiscGetXIDListReply rep;
- register int n;
XID *pids;
unsigned int count;
@@ -165,9 +162,9 @@ ProcXCMiscGetXIDList(client)
rep.length = count;
rep.count = count;
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.count, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.count);
}
WriteToClient(client, sizeof(xXCMiscGetXIDListReply), (char *)&rep);
if (count)
@@ -201,13 +198,12 @@ static int
SProcXCMiscGetVersion(client)
register ClientPtr client;
{
- register int n;
REQUEST(xXCMiscGetVersionReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
- swaps(&stuff->majorVersion, n);
- swaps(&stuff->minorVersion, n);
+ swaps(&stuff->majorVersion);
+ swaps(&stuff->minorVersion);
return ProcXCMiscGetVersion(client);
}
@@ -215,10 +211,9 @@ static int
SProcXCMiscGetXIDRange(client)
register ClientPtr client;
{
- register int n;
REQUEST(xReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
return ProcXCMiscGetXIDRange(client);
}
@@ -226,12 +221,11 @@ static int
SProcXCMiscGetXIDList(client)
register ClientPtr client;
{
- register int n;
REQUEST(xXCMiscGetXIDListReq);
REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
- swaps(&stuff->length, n);
- swapl(&stuff->count, n);
+ swaps(&stuff->length);
+ swapl(&stuff->count);
return ProcXCMiscGetXIDList(client);
}