aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/composite/compext.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/composite/compext.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/composite/compext.c')
-rw-r--r--nx-X11/programs/Xserver/composite/compext.c74
1 files changed, 31 insertions, 43 deletions
diff --git a/nx-X11/programs/Xserver/composite/compext.c b/nx-X11/programs/Xserver/composite/compext.c
index dbde88625..7c629fc54 100644
--- a/nx-X11/programs/Xserver/composite/compext.c
+++ b/nx-X11/programs/Xserver/composite/compext.c
@@ -113,7 +113,6 @@ ProcCompositeQueryVersion (ClientPtr client)
.sequenceNumber = client->sequence,
.length = 0
};
- register int n;
REQUEST(xCompositeQueryVersionReq);
@@ -128,10 +127,10 @@ ProcCompositeQueryVersion (ClientPtr client)
pCompositeClient->major_version = rep.majorVersion;
pCompositeClient->minor_version = rep.minorVersion;
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.majorVersion, n);
- swapl(&rep.minorVersion, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.majorVersion);
+ swapl(&rep.minorVersion);
}
WriteToClient(client, sizeof(xCompositeQueryVersionReply), (char *)&rep);
return Success;
@@ -352,7 +351,6 @@ ProcCompositeGetOverlayWindow(ClientPtr client)
CompScreenPtr cs;
CompOverlayClientPtr pOc;
int rc;
- int n = 0;
REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
/* Unsupported by current architecture and porting is too much effort. */
@@ -403,9 +401,9 @@ ProcCompositeGetOverlayWindow(ClientPtr client)
};
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.overlayWin, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.overlayWin);
}
WriteToClient(client, sz_xCompositeGetOverlayWindowReply, (char *)&rep);
@@ -470,111 +468,102 @@ ProcCompositeDispatch (ClientPtr client)
static int
SProcCompositeQueryVersion (ClientPtr client)
{
- int n;
REQUEST(xCompositeQueryVersionReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCompositeQueryVersionReq);
- swapl(&stuff->majorVersion, n);
- swapl(&stuff->minorVersion, n);
+ swapl(&stuff->majorVersion);
+ swapl(&stuff->minorVersion);
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
}
static int
SProcCompositeRedirectWindow (ClientPtr client)
{
- int n;
REQUEST(xCompositeRedirectWindowReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq);
- swapl (&stuff->window, n);
+ swapl (&stuff->window);
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
}
static int
SProcCompositeRedirectSubwindows (ClientPtr client)
{
- int n;
REQUEST(xCompositeRedirectSubwindowsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq);
- swapl (&stuff->window, n);
+ swapl (&stuff->window);
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
}
static int
SProcCompositeUnredirectWindow (ClientPtr client)
{
- int n;
REQUEST(xCompositeUnredirectWindowReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq);
- swapl (&stuff->window, n);
+ swapl (&stuff->window);
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
}
static int
SProcCompositeUnredirectSubwindows (ClientPtr client)
{
- int n;
REQUEST(xCompositeUnredirectSubwindowsReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq);
- swapl (&stuff->window, n);
+ swapl (&stuff->window);
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
}
static int
SProcCompositeCreateRegionFromBorderClip (ClientPtr client)
{
- int n;
REQUEST(xCompositeCreateRegionFromBorderClipReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq);
- swapl (&stuff->region, n);
- swapl (&stuff->window, n);
+ swapl (&stuff->region);
+ swapl (&stuff->window);
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
}
static int
SProcCompositeNameWindowPixmap (ClientPtr client)
{
- int n;
REQUEST(xCompositeNameWindowPixmapReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq);
- swapl (&stuff->window, n);
- swapl (&stuff->pixmap, n);
+ swapl (&stuff->window);
+ swapl (&stuff->pixmap);
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
}
static int
SProcCompositeGetOverlayWindow(ClientPtr client)
{
- int n = 0;
REQUEST(xCompositeGetOverlayWindowReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
- swapl(&stuff->window, n);
+ swapl(&stuff->window);
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
}
static int
SProcCompositeReleaseOverlayWindow(ClientPtr client)
{
- int n = 0;
REQUEST(xCompositeReleaseOverlayWindowReq);
- swaps(&stuff->length, n);
+ swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq);
- swapl(&stuff->window, n);
+ swapl(&stuff->window);
return (*ProcCompositeVector[stuff->compositeReqType]) (client);
}
@@ -903,7 +892,6 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
int rc;
PanoramiXRes *win, *overlayWin = NULL;
int i;
- int n = 0;
REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq);
@@ -986,9 +974,9 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
};
if (client->swapped) {
- swaps(&rep.sequenceNumber, n);
- swapl(&rep.length, n);
- swapl(&rep.overlayWin, n);
+ swaps(&rep.sequenceNumber);
+ swapl(&rep.length);
+ swapl(&rep.overlayWin);
}
WriteToClient(client, sz_xCompositeGetOverlayWindowReply, &rep);