Commit 2c7c520c authored by Matt Turner's avatar Matt Turner

Use internal temp variable for swap macros

Also, fix whitespace, mainly around
	swaps(&rep.sequenceNumber)
Reviewed-by: Peter Harris's avatarPeter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
parent c10bad3d
......@@ -47,10 +47,9 @@ ProcBigReqDispatch (ClientPtr client)
{
REQUEST(xBigReqEnableReq);
xBigReqEnableReply rep;
int n;
if (client->swapped) {
swaps(&stuff->length, n);
swaps(&stuff->length);
}
if (stuff->brReqType != X_BigReqEnable)
return BadRequest;
......@@ -62,8 +61,8 @@ ProcBigReqDispatch (ClientPtr client)
rep.sequenceNumber = client->sequence;
rep.max_request_size = maxBigRequestSize;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.max_request_size, n);
swaps(&rep.sequenceNumber);
swapl(&rep.max_request_size);
}
WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep);
return Success;
......
......@@ -46,7 +46,6 @@ ProcDPMSGetVersion(ClientPtr client)
{
/* REQUEST(xDPMSGetVersionReq); */
xDPMSGetVersionReply rep;
int n;
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
......@@ -56,9 +55,9 @@ ProcDPMSGetVersion(ClientPtr client)
rep.majorVersion = DPMSMajorVersion;
rep.minorVersion = DPMSMinorVersion;
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(xDPMSGetVersionReply), (char *)&rep);
return Success;
......@@ -69,7 +68,6 @@ ProcDPMSCapable(ClientPtr client)
{
/* REQUEST(xDPMSCapableReq); */
xDPMSCapableReply rep;
int n;
REQUEST_SIZE_MATCH(xDPMSCapableReq);
......@@ -79,7 +77,7 @@ ProcDPMSCapable(ClientPtr client)
rep.capable = DPMSCapableFlag;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swaps(&rep.sequenceNumber);
}
WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep);
return Success;
......@@ -90,7 +88,6 @@ ProcDPMSGetTimeouts(ClientPtr client)
{
/* REQUEST(xDPMSGetTimeoutsReq); */
xDPMSGetTimeoutsReply rep;
int n;
REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq);
......@@ -102,10 +99,10 @@ ProcDPMSGetTimeouts(ClientPtr client)
rep.off = DPMSOffTime / MILLI_PER_SECOND;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swaps(&rep.standby, n);
swaps(&rep.suspend, n);
swaps(&rep.off, n);
swaps(&rep.sequenceNumber);
swaps(&rep.standby);
swaps(&rep.suspend);
swaps(&rep.off);
}
WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *)&rep);
return Success;
......@@ -195,7 +192,6 @@ ProcDPMSInfo(ClientPtr client)
{
/* REQUEST(xDPMSInfoReq); */
xDPMSInfoReply rep;
int n;
REQUEST_SIZE_MATCH(xDPMSInfoReq);
......@@ -206,8 +202,8 @@ ProcDPMSInfo(ClientPtr client)
rep.state = DPMSEnabled;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swaps(&rep.power_level, n);
swaps(&rep.sequenceNumber);
swaps(&rep.power_level);
}
WriteToClient(client, sizeof(xDPMSInfoReply), (char *)&rep);
return Success;
......@@ -244,13 +240,12 @@ ProcDPMSDispatch (ClientPtr client)
static int
SProcDPMSGetVersion(ClientPtr client)
{
int n;
REQUEST(xDPMSGetVersionReq);
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSGetVersionReq);
swaps(&stuff->majorVersion, n);
swaps(&stuff->minorVersion, n);
swaps(&stuff->majorVersion);
swaps(&stuff->minorVersion);
return ProcDPMSGetVersion(client);
}
......@@ -258,9 +253,8 @@ static int
SProcDPMSCapable(ClientPtr client)
{
REQUEST(xDPMSCapableReq);
int n;
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSCapableReq);
return ProcDPMSCapable(client);
......@@ -270,9 +264,8 @@ static int
SProcDPMSGetTimeouts(ClientPtr client)
{
REQUEST(xDPMSGetTimeoutsReq);
int n;
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq);
return ProcDPMSGetTimeouts(client);
......@@ -282,14 +275,13 @@ static int
SProcDPMSSetTimeouts(ClientPtr client)
{
REQUEST(xDPMSSetTimeoutsReq);
int n;
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq);
swaps(&stuff->standby, n);
swaps(&stuff->suspend, n);
swaps(&stuff->off, n);
swaps(&stuff->standby);
swaps(&stuff->suspend);
swaps(&stuff->off);
return ProcDPMSSetTimeouts(client);
}
......@@ -297,9 +289,8 @@ static int
SProcDPMSEnable(ClientPtr client)
{
REQUEST(xDPMSEnableReq);
int n;
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSEnableReq);
return ProcDPMSEnable(client);
......@@ -309,9 +300,8 @@ static int
SProcDPMSDisable(ClientPtr client)
{
REQUEST(xDPMSDisableReq);
int n;
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSDisableReq);
return ProcDPMSDisable(client);
......@@ -321,12 +311,11 @@ static int
SProcDPMSForceLevel(ClientPtr client)
{
REQUEST(xDPMSForceLevelReq);
int n;
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSForceLevelReq);
swaps(&stuff->level, n);
swaps(&stuff->level);
return ProcDPMSForceLevel(client);
}
......@@ -335,9 +324,8 @@ static int
SProcDPMSInfo(ClientPtr client)
{
REQUEST(xDPMSInfoReq);
int n;
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xDPMSInfoReq);
return ProcDPMSInfo(client);
......
......@@ -58,7 +58,6 @@ static void SGEGenericEvent(xEvent* from, xEvent* to);
static int
ProcGEQueryVersion(ClientPtr client)
{
int n;
GEClientInfoPtr pGEClient = GEGetClient(client);
xGEQueryVersionReply rep;
REQUEST(xGEQueryVersionReq);
......@@ -80,10 +79,10 @@ ProcGEQueryVersion(ClientPtr client)
if (client->swapped)
{
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);
swaps(&rep.majorVersion, n);
swaps(&rep.minorVersion, n);
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
WriteToClient(client, sizeof(xGEQueryVersionReply), (char*)&rep);
......@@ -101,13 +100,12 @@ int (*ProcGEVector[GENumberRequests])(ClientPtr) = {
static int
SProcGEQueryVersion(ClientPtr client)
{
int n;
REQUEST(xGEQueryVersionReq);
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGEQueryVersionReq);
swaps(&stuff->majorVersion, n);
swaps(&stuff->minorVersion, n);
swaps(&stuff->majorVersion);
swaps(&stuff->minorVersion);
return(*ProcGEVector[stuff->ReqType])(client);
}
......
......@@ -909,7 +909,6 @@ ProcPanoramiXQueryVersion (ClientPtr client)
{
/* REQUEST(xPanoramiXQueryVersionReq); */
xPanoramiXQueryVersionReply rep;
register int n;
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
rep.type = X_Reply;
......@@ -918,10 +917,10 @@ ProcPanoramiXQueryVersion (ClientPtr client)
rep.majorVersion = SERVER_PANORAMIX_MAJOR_VERSION;
rep.minorVersion = SERVER_PANORAMIX_MINOR_VERSION;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);
swaps(&rep.majorVersion, n);
swaps(&rep.minorVersion, n);
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep);
return Success;
......@@ -933,7 +932,7 @@ ProcPanoramiXGetState(ClientPtr client)
REQUEST(xPanoramiXGetStateReq);
WindowPtr pWin;
xPanoramiXGetStateReply rep;
int n, rc;
int rc;
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
......@@ -946,9 +945,9 @@ ProcPanoramiXGetState(ClientPtr client)
rep.state = !noPanoramiXExtension;
rep.window = stuff->window;
if (client->swapped) {
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swapl (&rep.window, n);
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swapl(&rep.window);
}
WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep);
return Success;
......@@ -961,7 +960,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
REQUEST(xPanoramiXGetScreenCountReq);
WindowPtr pWin;
xPanoramiXGetScreenCountReply rep;
int n, rc;
int rc;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
......@@ -974,9 +973,9 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
rep.ScreenCount = PanoramiXNumScreens;
rep.window = stuff->window;
if (client->swapped) {
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swapl (&rep.window, n);
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swapl(&rep.window);
}
WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep);
return Success;
......@@ -988,7 +987,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
REQUEST(xPanoramiXGetScreenSizeReq);
WindowPtr pWin;
xPanoramiXGetScreenSizeReply rep;
int n, rc;
int rc;
if (stuff->screen >= PanoramiXNumScreens)
return BadMatch;
......@@ -1007,12 +1006,12 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
rep.window = stuff->window;
rep.screen = stuff->screen;
if (client->swapped) {
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swapl (&rep.width, n);
swapl (&rep.height, n);
swapl (&rep.window, n);
swapl (&rep.screen, n);
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swapl(&rep.width);
swapl(&rep.height);
swapl(&rep.window);
swapl(&rep.screen);
}
WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep);
return Success;
......@@ -1040,10 +1039,9 @@ ProcXineramaIsActive(ClientPtr client)
rep.state = !noPanoramiXExtension;
#endif
if (client->swapped) {
int n;
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swapl (&rep.state, n);
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swapl(&rep.state);
}
WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep);
return Success;
......@@ -1063,10 +1061,9 @@ ProcXineramaQueryScreens(ClientPtr client)
rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
if (client->swapped) {
int n;
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swapl (&rep.number, n);
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swapl(&rep.number);
}
WriteToClient (client, sizeof (xXineramaQueryScreensReply), (char *) &rep);
......@@ -1081,11 +1078,10 @@ ProcXineramaQueryScreens(ClientPtr client)
scratch.height = screenInfo.screens[i]->height;
if(client->swapped) {
int n;
swaps (&scratch.x_org, n);
swaps (&scratch.y_org, n);
swaps (&scratch.width, n);
swaps (&scratch.height, n);
swaps(&scratch.x_org);
swaps(&scratch.y_org);
swaps(&scratch.width);
swaps(&scratch.height);
}
WriteToClient (client, sz_XineramaScreenInfo, (char *) &scratch);
}
......
......@@ -51,9 +51,8 @@ static int
SProcPanoramiXQueryVersion (ClientPtr client)
{
REQUEST(xPanoramiXQueryVersionReq);
int n;
swaps(&stuff->length,n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH (xPanoramiXQueryVersionReq);
return ProcPanoramiXQueryVersion(client);
}
......@@ -62,11 +61,10 @@ static int
SProcPanoramiXGetState(ClientPtr client)
{
REQUEST(xPanoramiXGetStateReq);
int n;
swaps (&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
swapl (&stuff->window, n);
swapl(&stuff->window);
return ProcPanoramiXGetState(client);
}
......@@ -74,11 +72,10 @@ static int
SProcPanoramiXGetScreenCount(ClientPtr client)
{
REQUEST(xPanoramiXGetScreenCountReq);
int n;
swaps (&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
swapl (&stuff->window, n);
swapl(&stuff->window);
return ProcPanoramiXGetScreenCount(client);
}
......@@ -86,12 +83,11 @@ static int
SProcPanoramiXGetScreenSize(ClientPtr client)
{
REQUEST(xPanoramiXGetScreenSizeReq);
int n;
swaps (&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
swapl (&stuff->window, n);
swapl (&stuff->screen, n);
swapl(&stuff->window);
swapl(&stuff->screen);
return ProcPanoramiXGetScreenSize(client);
}
......@@ -100,9 +96,8 @@ static int
SProcXineramaIsActive(ClientPtr client)
{
REQUEST(xXineramaIsActiveReq);
int n;
swaps (&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXineramaIsActiveReq);
return ProcXineramaIsActive(client);
}
......@@ -112,9 +107,8 @@ static int
SProcXineramaQueryScreens(ClientPtr client)
{
REQUEST(xXineramaQueryScreensReq);
int n;
swaps (&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
return ProcXineramaQueryScreens(client);
}
......
......@@ -669,8 +669,6 @@ static int
ProcScreenSaverQueryVersion (ClientPtr client)
{
xScreenSaverQueryVersionReply rep;
int n;
REQUEST_SIZE_MATCH (xScreenSaverQueryVersionReq);
rep.type = X_Reply;
rep.length = 0;
......@@ -678,8 +676,8 @@ ProcScreenSaverQueryVersion (ClientPtr client)
rep.majorVersion = SERVER_SAVER_MAJOR_VERSION;
rep.minorVersion = SERVER_SAVER_MINOR_VERSION;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);
swaps(&rep.sequenceNumber);
swapl(&rep.length);
}
WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), (char *)&rep);
return Success;
......@@ -690,7 +688,7 @@ ProcScreenSaverQueryInfo (ClientPtr client)
{
REQUEST(xScreenSaverQueryInfoReq);
xScreenSaverQueryInfoReply rep;
int n, rc;
int rc;
ScreenSaverStuffPtr pSaver;
DrawablePtr pDraw;
CARD32 lastInput;
......@@ -750,12 +748,12 @@ ProcScreenSaverQueryInfo (ClientPtr client)
rep.kind = ScreenSaverInternal;
if (client->swapped)
{
swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n);
swapl (&rep.window, n);
swapl (&rep.tilOrSince, n);
swapl (&rep.idle, n);
swapl (&rep.eventMask, n);
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swapl(&rep.window);
swapl(&rep.tilOrSince);
swapl(&rep.idle);
swapl(&rep.eventMask);
}
WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), (char *)&rep);
return Success;
......@@ -1384,9 +1382,7 @@ static int
SProcScreenSaverQueryVersion (ClientPtr client)
{
REQUEST(xScreenSaverQueryVersionReq);
int n;
swaps (&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq);
return ProcScreenSaverQueryVersion (client);
}
......@@ -1395,11 +1391,9 @@ static int
SProcScreenSaverQueryInfo (ClientPtr client)
{
REQUEST(xScreenSaverQueryInfoReq);
int n;
swaps (&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq);
swapl (&stuff->drawable, n);
swapl(&stuff->drawable);
return ProcScreenSaverQueryInfo (client);
}
......@@ -1407,12 +1401,10 @@ static int
SProcScreenSaverSelectInput (ClientPtr client)
{
REQUEST(xScreenSaverSelectInputReq);
int n;
swaps (&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq);
swapl (&stuff->drawable, n);
swapl (&stuff->eventMask, n);
swapl(&stuff->drawable);
swapl(&stuff->eventMask);
return ProcScreenSaverSelectInput (client);
}
......@@ -1420,18 +1412,16 @@ static int
SProcScreenSaverSetAttributes (ClientPtr client)
{
REQUEST(xScreenSaverSetAttributesReq);
int n;
swaps (&stuff->length, n);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq);
swapl (&stuff->drawable, n);
swaps (&stuff->x, n);
swaps (&stuff->y, n);
swaps (&stuff->width, n);
swaps (&stuff->height, n);
swaps (&stuff->borderWidth, n);
swapl (&stuff->visualID, n);
swapl (&stuff->mask, n);
swapl(&stuff->drawable);
swaps(&stuff->x);
swaps(&stuff->y);
swaps(&stuff->width);
swaps(&stuff->height);
swaps(&stuff->borderWidth);
swapl(&stuff->visualID);
swapl(&stuff->mask);
SwapRestL(stuff);
return ProcScreenSaverSetAttributes (client);
}
......@@ -1440,23 +1430,20 @@ static int
SProcScreenSaverUnsetAttributes (ClientPtr client)
{
REQUEST(xScreenSaverUnsetAttributesReq);
int n;
swaps (&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq);
swapl (&stuff->drawable, n);
swapl(&stuff->drawable);
return ProcScreenSaverUnsetAttributes (client);
}
static int
SProcScreenSaverSuspend (ClientPtr client)
{
int n;
REQUEST(xScreenSaverSuspendReq);
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xScreenSaverSuspendReq);
swapl(&stuff->suspend, n);
swapl(&stuff->suspend);
return ProcScreenSaverSuspend (client);
}
......
......@@ -368,10 +368,9 @@ ProcSecurityQueryVersion(
rep.minorVersion = SERVER_SECURITY_MINOR_VERSION;
if(client->swapped)
{
char n;
swaps(&rep.sequenceNumber, n);
swaps(&rep.majorVersion, n);
swaps(&rep.minorVersion, n);
swaps(&rep.sequenceNumber);
swaps(&rep.majorVersion);
swaps(&rep.minorVersion);
}
(void)WriteToClient(client, SIZEOF(xSecurityQueryVersionReply),
(char *)&rep);
......@@ -580,11 +579,10 @@ ProcSecurityGenerateAuthorization(
if (client->swapped)
{
char n;
swapl(&rep.length, n);
swaps(&rep.sequenceNumber, n);
swapl(&rep.authId, n);
swaps(&rep.dataLength, n);
swapl(&rep.length);
swaps(&rep.sequenceNumber);
swapl(&rep.authId);
swaps(&rep.dataLength);
}
WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply),
......@@ -652,12 +650,11 @@ SProcSecurityQueryVersion(
ClientPtr client)
{
REQUEST(xSecurityQueryVersionReq);
char n;
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
swaps(&stuff->majorVersion, n);
swaps(&stuff->minorVersion,n);
swaps(&stuff->majorVersion);
swaps(&stuff->minorVersion);
return ProcSecurityQueryVersion(client);
} /* SProcSecurityQueryVersion */
......@@ -667,16 +664,15 @@ SProcSecurityGenerateAuthorization(
ClientPtr client)
{
REQUEST(xSecurityGenerateAuthorizationReq);
char n;
CARD32 *values;
unsigned long nvalues;
int values_offset;
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq);
swaps(&stuff->nbytesAuthProto, n);
swaps(&stuff->nbytesAuthData, n);
swapl(&stuff->valueMask, n);
swaps(&stuff->nbytesAuthProto);
swaps(&stuff->nbytesAuthData);
swapl(&stuff->valueMask);
values_offset = bytes_to_int32(stuff->nbytesAuthProto) +
bytes_to_int32(stuff->nbytesAuthData);
if (values_offset >
......@@ -694,11 +690,10 @@ SProcSecurityRevokeAuthorization(
ClientPtr client)
{
REQUEST(xSecurityRevokeAuthorizationReq);
char n;
swaps(&stuff->length, n);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
swapl(&stuff->authId, n);
swapl(&stuff->authId);
return ProcSecurityRevokeAuthorization(client);
} /* SProcSecurityRevokeAuthorization */
......
......@@ -214,8 +214,6 @@ static int
ProcShapeQueryVersion (ClientPtr client)
{
xShapeQueryVersionReply rep;
int n;
REQUEST_SIZE_MATCH (xShapeQueryVersionReq);
memset(&rep, 0, sizeof(xShapeQueryVersionReply));
rep.type = X_Reply;
......@@ -224,10 +222,10 @@ ProcShapeQueryVersion (ClientPtr client)
rep.majorVersion = SERVER_SHAPE_MAJOR_VERSION;
rep.minorVersion = SERVER_SHAPE_MINOR_VERSION;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.length