diff options
author | Keith Packard <keithp@keithp.com> | 2011-09-21 14:34:27 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-09-21 14:34:27 -0700 |
commit | 7fb4bef0394a5d09680985d34bce8252b61493cb (patch) | |
tree | 9377b410bd93e67d78970c69b7c79cc8c318fa23 /Xext | |
parent | 98f4940093dc90c3366d3e4d3ddceacbaee299dc (diff) | |
parent | c90903b4f7a826ae6826a8dd0a901c8362500e46 (diff) |
Merge remote-tracking branch 'mattst88/for-keith'
Diffstat (limited to 'Xext')
-rw-r--r-- | Xext/bigreq.c | 7 | ||||
-rw-r--r-- | Xext/dpms.c | 60 | ||||
-rw-r--r-- | Xext/geext.c | 16 | ||||
-rw-r--r-- | Xext/panoramiX.c | 62 | ||||
-rw-r--r-- | Xext/panoramiXSwap.c | 26 | ||||
-rw-r--r-- | Xext/saver.c | 68 | ||||
-rw-r--r-- | Xext/security.c | 37 | ||||
-rw-r--r-- | Xext/shape.c | 110 | ||||
-rw-r--r-- | Xext/shm.c | 108 | ||||
-rw-r--r-- | Xext/sync.c | 186 | ||||
-rw-r--r-- | Xext/xcmisc.c | 36 | ||||
-rw-r--r-- | Xext/xf86bigfont.c | 62 | ||||
-rw-r--r-- | Xext/xres.c | 64 | ||||
-rw-r--r-- | Xext/xselinux_ext.c | 64 | ||||
-rw-r--r-- | Xext/xtest.c | 30 | ||||
-rw-r--r-- | Xext/xvdisp.c | 407 |
16 files changed, 568 insertions, 775 deletions
diff --git a/Xext/bigreq.c b/Xext/bigreq.c index a540bcbcb..a939e1699 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -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; diff --git a/Xext/dpms.c b/Xext/dpms.c index 33a6e267c..0c8f18f47 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -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); diff --git a/Xext/geext.c b/Xext/geext.c index 18f8ffeac..a8718ccbd 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -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); } diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index 425c10ce4..fae7c81c9 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -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); } diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c index e1720c9ab..79277021a 100644 --- a/Xext/panoramiXSwap.c +++ b/Xext/panoramiXSwap.c @@ -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); } diff --git a/Xext/saver.c b/Xext/saver.c index 18886038a..142758c87 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -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,19 @@ 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); return ProcScreenSaverSuspend (client); } diff --git a/Xext/security.c b/Xext/security.c index 8673880d1..08d8158e3 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -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 */ diff --git a/Xext/shape.c b/Xext/shape.c index 115fc07ed..cb2a0e0f6 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -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, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); } WriteToClient(client, sizeof (xShapeQueryVersionReply), (char *)&rep); return Success; @@ -637,7 +635,7 @@ ProcShapeQueryExtents (ClientPtr client) WindowPtr pWin; xShapeQueryExtentsReply rep; BoxRec extents, *pExtents; - int n, rc; + int rc; RegionPtr region; REQUEST_SIZE_MATCH (xShapeQueryExtentsReq); @@ -679,16 +677,16 @@ ProcShapeQueryExtents (ClientPtr client) rep.widthClipShape = extents.x2 - extents.x1; rep.heightClipShape = extents.y2 - extents.y1; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.xBoundingShape, n); - swaps(&rep.yBoundingShape, n); - swaps(&rep.widthBoundingShape, n); - swaps(&rep.heightBoundingShape, n); - swaps(&rep.xClipShape, n); - swaps(&rep.yClipShape, n); - swaps(&rep.widthClipShape, n); - swaps(&rep.heightClipShape, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.xBoundingShape); + swaps(&rep.yBoundingShape); + swaps(&rep.widthBoundingShape); + swaps(&rep.heightBoundingShape); + swaps(&rep.xClipShape); + swaps(&rep.yClipShape); + swaps(&rep.widthClipShape); + swaps(&rep.heightClipShape); } WriteToClient(client, sizeof (xShapeQueryExtentsReply), (char *)&rep); return Success; @@ -915,8 +913,6 @@ ProcShapeInputSelected (ClientPtr client) ShapeEventPtr pShapeEvent, *pHead; int enabled, rc; xShapeInputSelectedReply rep; - int n; - REQUEST_SIZE_MATCH (xShapeInputSelectedReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) @@ -942,8 +938,8 @@ ProcShapeInputSelected (ClientPtr client) rep.sequenceNumber = client->sequence; rep.enabled = enabled; if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); } WriteToClient (client, sizeof (xShapeInputSelectedReply), (char *) &rep); return Success; @@ -958,8 +954,6 @@ ProcShapeGetRectangles (ClientPtr client) xRectangle *rects; int nrects, i, rc; RegionPtr region; - int n; - REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) @@ -1023,9 +1017,9 @@ ProcShapeGetRectangles (ClientPtr client) rep.ordering = YXBanded; rep.nrects = nrects; if (client->swapped) { - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.nrects, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.nrects); SwapShorts ((short *)rects, (unsigned long)nrects * 4); } WriteToClient (client, sizeof (rep), (char *) &rep); @@ -1100,24 +1094,22 @@ SShapeNotifyEvent(xShapeNotifyEvent *from, xShapeNotifyEvent *to) static int SProcShapeQueryVersion (ClientPtr client) { - int n; REQUEST (xShapeQueryVersionReq); - swaps (&stuff->length, n); + swaps(&stuff->length); return ProcShapeQueryVersion (client); } static int SProcShapeRectangles (ClientPtr client) { - char n; REQUEST (xShapeRectanglesReq); - swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); - swapl (&stuff->dest, n); - swaps (&stuff->xOff, n); - swaps (&stuff->yOff, n); + swapl(&stuff->dest); + swaps(&stuff->xOff); + swaps(&stuff->yOff); SwapRestS(stuff); return ProcShapeRectangles (client); } @@ -1125,80 +1117,74 @@ SProcShapeRectangles (ClientPtr client) static int SProcShapeMask (ClientPtr client) { - char n; REQUEST (xShapeMaskReq); - swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xShapeMaskReq); - swapl (&stuff->dest, n); - swaps (&stuff->xOff, n); - swaps (&stuff->yOff, n); - swapl (&stuff->src, n); + swapl(&stuff->dest); + swaps(&stuff->xOff); + swaps(&stuff->yOff); + swapl(&stuff->src); return ProcShapeMask (client); } static int SProcShapeCombine (ClientPtr client) { - char n; REQUEST (xShapeCombineReq); - swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xShapeCombineReq); - swapl (&stuff->dest, n); - swaps (&stuff->xOff, n); - swaps (&stuff->yOff, n); - swapl (&stuff->src, n); + swapl(&stuff->dest); + swaps(&stuff->xOff); + swaps(&stuff->yOff); + swapl(&stuff->src); return ProcShapeCombine (client); } static int SProcShapeOffset (ClientPtr client) { - char n; REQUEST (xShapeOffsetReq); - swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xShapeOffsetReq); - swapl (&stuff->dest, n); - swaps (&stuff->xOff, n); - swaps (&stuff->yOff, n); + swapl(&stuff->dest); + swaps(&stuff->xOff); + swaps(&stuff->yOff); return ProcShapeOffset (client); } static int SProcShapeQueryExtents (ClientPtr client) { - char n; REQUEST (xShapeQueryExtentsReq); - swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xShapeQueryExtentsReq); - swapl (&stuff->window, n); + swapl(&stuff->window); return ProcShapeQueryExtents (client); } static int SProcShapeSelectInput (ClientPtr client) { - char n; REQUEST (xShapeSelectInputReq); - swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xShapeSelectInputReq); - swapl (&stuff->window, n); + swapl(&stuff->window); return ProcShapeSelectInput (client); } static int SProcShapeInputSelected (ClientPtr client) { - int n; REQUEST (xShapeInputSelectedReq); - swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xShapeInputSelectedReq); - swapl (&stuff->window, n); + swapl(&stuff->window); return ProcShapeInputSelected (client); } @@ -1206,11 +1192,9 @@ static int SProcShapeGetRectangles (ClientPtr client) { REQUEST(xShapeGetRectanglesReq); - char n; - - swaps (&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); - swapl (&stuff->window, n); + swapl(&stuff->window); return ProcShapeGetRectangles (client); } diff --git a/Xext/shm.c b/Xext/shm.c index 4141a8fe6..9c8beb27c 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -289,7 +289,6 @@ static int ProcShmQueryVersion(ClientPtr client) { xShmQueryVersionReply rep; - int n; REQUEST_SIZE_MATCH(xShmQueryVersionReq); memset(&rep, 0, sizeof(xShmQueryVersionReply)); @@ -303,12 +302,12 @@ ProcShmQueryVersion(ClientPtr client) rep.uid = geteuid(); rep.gid = getegid(); if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.majorVersion, n); - swaps(&rep.minorVersion, n); - swaps(&rep.uid, n); - swaps(&rep.gid, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.majorVersion); + swaps(&rep.minorVersion); + swaps(&rep.uid); + swaps(&rep.gid); } WriteToClient(client, sizeof(xShmQueryVersionReply), (char *)&rep); return Success; @@ -633,7 +632,7 @@ ProcShmGetImage(ClientPtr client) Mask plane = 0; xShmGetImageReply xgi; ShmDescPtr shmdesc; - int n, rc; + int rc; REQUEST(xShmGetImageReq); @@ -727,10 +726,10 @@ ProcShmGetImage(ClientPtr client) } if (client->swapped) { - swaps(&xgi.sequenceNumber, n); - swapl(&xgi.length, n); - swapl(&xgi.visual, n); - swapl(&xgi.size, n); + swaps(&xgi.sequenceNumber); + swapl(&xgi.length); + swapl(&xgi.visual); + swapl(&xgi.size); } WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi); @@ -897,11 +896,10 @@ ProcPanoramiXShmGetImage(ClientPtr client) free(drawables); if (client->swapped) { - int n; - swaps(&xgi.sequenceNumber, n); - swapl(&xgi.length, n); - swapl(&xgi.visual, n); - swapl(&xgi.size, n); + swaps(&xgi.sequenceNumber); + swapl(&xgi.length); + swapl(&xgi.visual); + swapl(&xgi.size); } WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi); @@ -1161,89 +1159,83 @@ SShmCompletionEvent(xShmCompletionEvent *from, xShmCompletionEvent *to) static int SProcShmQueryVersion(ClientPtr client) { - int n; REQUEST(xShmQueryVersionReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return ProcShmQueryVersion(client); } static int SProcShmAttach(ClientPtr client) { - int n; REQUEST(xShmAttachReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmAttachReq); - swapl(&stuff->shmseg, n); - swapl(&stuff->shmid, n); + swapl(&stuff->shmseg); + swapl(&stuff->shmid); return ProcShmAttach(client); } static int SProcShmDetach(ClientPtr client) { - int n; REQUEST(xShmDetachReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmDetachReq); - swapl(&stuff->shmseg, n); + swapl(&stuff->shmseg); return ProcShmDetach(client); } static int SProcShmPutImage(ClientPtr client) { - int n; REQUEST(xShmPutImageReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmPutImageReq); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->totalWidth, n); - swaps(&stuff->totalHeight, n); - swaps(&stuff->srcX, n); - swaps(&stuff->srcY, n); - swaps(&stuff->srcWidth, n); - swaps(&stuff->srcHeight, n); - swaps(&stuff->dstX, n); - swaps(&stuff->dstY, n); - swapl(&stuff->shmseg, n); - swapl(&stuff->offset, n); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->totalWidth); + swaps(&stuff->totalHeight); + swaps(&stuff->srcX); + swaps(&stuff->srcY); + swaps(&stuff->srcWidth); + swaps(&stuff->srcHeight); + swaps(&stuff->dstX); + swaps(&stuff->dstY); + swapl(&stuff->shmseg); + swapl(&stuff->offset); return ProcShmPutImage(client); } static int SProcShmGetImage(ClientPtr client) { - int n; REQUEST(xShmGetImageReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmGetImageReq); - swapl(&stuff->drawable, n); - swaps(&stuff->x, n); - swaps(&stuff->y, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); - swapl(&stuff->planeMask, n); - swapl(&stuff->shmseg, n); - swapl(&stuff->offset, n); + swapl(&stuff->drawable); + swaps(&stuff->x); + swaps(&stuff->y); + swaps(&stuff->width); + swaps(&stuff->height); + swapl(&stuff->planeMask); + swapl(&stuff->shmseg); + swapl(&stuff->offset); return ProcShmGetImage(client); } static int SProcShmCreatePixmap(ClientPtr client) { - int n; REQUEST(xShmCreatePixmapReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmCreatePixmapReq); - swapl(&stuff->pid, n); - swapl(&stuff->drawable, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); - swapl(&stuff->shmseg, n); - swapl(&stuff->offset, n); + swapl(&stuff->pid); + swapl(&stuff->drawable); + swaps(&stuff->width); + swaps(&stuff->height); + swapl(&stuff->shmseg); + swapl(&stuff->offset); return ProcShmCreatePixmap(client); } diff --git a/Xext/sync.c b/Xext/sync.c index 36dd27888..3b257f73b 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -1273,8 +1273,6 @@ static int ProcSyncInitialize(ClientPtr client) { xSyncInitializeReply rep; - int n; - REQUEST_SIZE_MATCH(xSyncInitializeReq); memset(&rep, 0, sizeof(xSyncInitializeReply)); @@ -1286,7 +1284,7 @@ ProcSyncInitialize(ClientPtr client) if (client->swapped) { - swaps(&rep.sequenceNumber, n); + swaps(&rep.sequenceNumber); } WriteToClient(client, sizeof(rep), (char *) &rep); return Success; @@ -1326,10 +1324,9 @@ ProcSyncListSystemCounters(ClientPtr client) if (client->swapped) { - char n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.nCounters, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.nCounters); } for (i = 0; i < SyncNumSystemCounters; i++) @@ -1346,11 +1343,10 @@ ProcSyncListSystemCounters(ClientPtr client) if (client->swapped) { - char n; - swapl(&walklist->counter, n); - swapl(&walklist->resolution_hi, n); - swapl(&walklist->resolution_lo, n); - swaps(&walklist->name_length, n); + swapl(&walklist->counter); + swapl(&walklist->resolution_hi); + swapl(&walklist->resolution_lo); + swaps(&walklist->name_length); } pname_in_reply = ((char *)walklist) + sz_xSyncSystemCounter; @@ -1433,9 +1429,8 @@ ProcSyncGetPriority(ClientPtr client) if (client->swapped) { - char n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.priority, n); + swaps(&rep.sequenceNumber); + swapl(&rep.priority); } WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep); @@ -1732,11 +1727,10 @@ ProcSyncQueryCounter(ClientPtr client) rep.value_lo = XSyncValueLow32(pCounter->value); if (client->swapped) { - char n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.value_hi, n); - swapl(&rep.value_lo, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.value_hi); + swapl(&rep.value_lo); } WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep); return Success; @@ -1921,15 +1915,14 @@ ProcSyncQueryAlarm(ClientPtr client) if (client->swapped) { - char n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.counter, n); - swapl(&rep.wait_value_hi, n); - swapl(&rep.wait_value_lo, n); - swapl(&rep.test_type, n); - swapl(&rep.delta_hi, n); - swapl(&rep.delta_lo, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.counter); + swapl(&rep.wait_value_hi); + swapl(&rep.wait_value_lo); + swapl(&rep.test_type); + swapl(&rep.delta_hi); + swapl(&rep.delta_lo); } WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep); @@ -2087,9 +2080,8 @@ ProcSyncQueryFence(ClientPtr client) if (client->swapped) { - char n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); } WriteToClient(client, sizeof(xSyncQueryFenceReply), (char *) &rep); @@ -2242,9 +2234,7 @@ static int SProcSyncInitialize(ClientPtr client) { REQUEST(xSyncInitializeReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncInitializeReq); return ProcSyncInitialize(client); @@ -2254,9 +2244,7 @@ static int SProcSyncListSystemCounters(ClientPtr client) { REQUEST(xSyncListSystemCountersReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncListSystemCountersReq); return ProcSyncListSystemCounters(client); @@ -2266,13 +2254,11 @@ static int SProcSyncCreateCounter(ClientPtr client) { REQUEST(xSyncCreateCounterReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncCreateCounterReq); - swapl(&stuff->cid, n); - swapl(&stuff->initial_value_lo, n); - swapl(&stuff->initial_value_hi, n); + swapl(&stuff->cid); + swapl(&stuff->initial_value_lo); + swapl(&stuff->initial_value_hi); return ProcSyncCreateCounter(client); } @@ -2281,13 +2267,11 @@ static int SProcSyncSetCounter(ClientPtr client) { REQUEST(xSyncSetCounterReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncSetCounterReq); - swapl(&stuff->cid, n); - swapl(&stuff->value_lo, n); - swapl(&stuff->value_hi, n); + swapl(&stuff->cid); + swapl(&stuff->value_lo); + swapl(&stuff->value_hi); return ProcSyncSetCounter(client); } @@ -2296,13 +2280,11 @@ static int SProcSyncChangeCounter(ClientPtr client) { REQUEST(xSyncChangeCounterReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncChangeCounterReq); - swapl(&stuff->cid, n); - swapl(&stuff->value_lo, n); - swapl(&stuff->value_hi, n); + swapl(&stuff->cid); + swapl(&stuff->value_lo); + swapl(&stuff->value_hi); return ProcSyncChangeCounter(client); } @@ -2311,11 +2293,9 @@ static int SProcSyncQueryCounter(ClientPtr client) { REQUEST(xSyncQueryCounterReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncQueryCounterReq); - swapl(&stuff->counter, n); + swapl(&stuff->counter); return ProcSyncQueryCounter(client); } @@ -2324,11 +2304,9 @@ static int SProcSyncDestroyCounter(ClientPtr client) { REQUEST(xSyncDestroyCounterReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncDestroyCounterReq); - swapl(&stuff->counter, n); + swapl(&stuff->counter); return ProcSyncDestroyCounter(client); } @@ -2337,9 +2315,7 @@ static int SProcSyncAwait(ClientPtr client) { REQUEST(xSyncAwaitReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncAwaitReq); SwapRestL(stuff); @@ -2350,12 +2326,10 @@ static int SProcSyncCreateAlarm(ClientPtr client) { REQUEST(xSyncCreateAlarmReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq); - swapl(&stuff->id, n); - swapl(&stuff->valueMask, n); + swapl(&stuff->id); + swapl(&stuff->valueMask); SwapRestL(stuff); return ProcSyncCreateAlarm(client); @@ -2365,12 +2339,10 @@ static int SProcSyncChangeAlarm(ClientPtr client) { REQUEST(xSyncChangeAlarmReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); - swapl(&stuff->alarm, n); - swapl(&stuff->valueMask, n); + swapl(&stuff->alarm); + swapl(&stuff->valueMask); SwapRestL(stuff); return ProcSyncChangeAlarm(client); } @@ -2379,11 +2351,9 @@ static int SProcSyncQueryAlarm(ClientPtr client) { REQUEST(xSyncQueryAlarmReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncQueryAlarmReq); - swapl(&stuff->alarm, n); + swapl(&stuff->alarm); return ProcSyncQueryAlarm(client); } @@ -2392,11 +2362,9 @@ static int SProcSyncDestroyAlarm(ClientPtr client) { REQUEST(xSyncDestroyAlarmReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncDestroyAlarmReq); - swapl(&stuff->alarm, n); + swapl(&stuff->alarm); return ProcSyncDestroyAlarm(client); } @@ -2405,12 +2373,10 @@ static int SProcSyncSetPriority(ClientPtr client) { REQUEST(xSyncSetPriorityReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncSetPriorityReq); - swapl(&stuff->id, n); - swapl(&stuff->priority, n); + swapl(&stuff->id); + swapl(&stuff->priority); return ProcSyncSetPriority(client); } @@ -2419,11 +2385,9 @@ static int SProcSyncGetPriority(ClientPtr client) { REQUEST(xSyncGetPriorityReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncGetPriorityReq); - swapl(&stuff->id, n); + swapl(&stuff->id); return ProcSyncGetPriority(client); } @@ -2432,11 +2396,9 @@ static int SProcSyncCreateFence(ClientPtr client) { REQUEST(xSyncCreateFenceReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncCreateFenceReq); - swapl(&stuff->fid, n); + swapl(&stuff->fid); return ProcSyncCreateFence(client); } @@ -2445,11 +2407,9 @@ static int SProcSyncTriggerFence(ClientPtr client) { REQUEST(xSyncTriggerFenceReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncTriggerFenceReq); - swapl(&stuff->fid, n); + swapl(&stuff->fid); return ProcSyncTriggerFence(client); } @@ -2458,11 +2418,9 @@ static int SProcSyncResetFence(ClientPtr client) { REQUEST(xSyncResetFenceReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncResetFenceReq); - swapl(&stuff->fid, n); + swapl(&stuff->fid); return ProcSyncResetFence(client); } @@ -2471,11 +2429,9 @@ static int SProcSyncDestroyFence(ClientPtr client) { REQUEST(xSyncDestroyFenceReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncDestroyFenceReq); - swapl(&stuff->fid, n); + swapl(&stuff->fid); return ProcSyncDestroyFence(client); } @@ -2484,11 +2440,9 @@ static int SProcSyncQueryFence(ClientPtr client) { REQUEST(xSyncQueryFenceReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH (xSyncQueryFenceReq); - swapl(&stuff->fid, n); + swapl(&stuff->fid); return ProcSyncQueryFence(client); } @@ -2497,9 +2451,7 @@ static int SProcSyncAwaitFence(ClientPtr client) { REQUEST(xSyncAwaitFenceReq); - char n; - - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq); SwapRestL(stuff); diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index 378afccca..8e3c9cd80 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -51,7 +51,6 @@ static int ProcXCMiscGetVersion(ClientPtr client) { xXCMiscGetVersionReply rep; - int n; REQUEST_SIZE_MATCH(xXCMiscGetVersionReq); rep.type = X_Reply; @@ -60,9 +59,9 @@ ProcXCMiscGetVersion(ClientPtr 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 Success; @@ -72,7 +71,6 @@ static int ProcXCMiscGetXIDRange(ClientPtr client) { xXCMiscGetXIDRangeReply rep; - int n; XID min_id, max_id; REQUEST_SIZE_MATCH(xXCMiscGetXIDRangeReq); @@ -83,9 +81,9 @@ ProcXCMiscGetXIDRange(ClientPtr 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 Success; @@ -96,7 +94,6 @@ ProcXCMiscGetXIDList(ClientPtr client) { REQUEST(xXCMiscGetXIDListReq); xXCMiscGetXIDListReply rep; - int n; XID *pids; unsigned int count; @@ -116,9 +113,9 @@ ProcXCMiscGetXIDList(ClientPtr 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) @@ -150,34 +147,31 @@ ProcXCMiscDispatch (ClientPtr client) static int SProcXCMiscGetVersion(ClientPtr client) { - 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); } static int SProcXCMiscGetXIDRange(ClientPtr client) { - int n; REQUEST(xReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return ProcXCMiscGetXIDRange(client); } static int SProcXCMiscGetXIDList(ClientPtr client) { - int n; REQUEST(xXCMiscGetXIDListReq); - swaps(&stuff->length, n); - swapl(&stuff->count, n); + swaps(&stuff->length); + swapl(&stuff->count); return ProcXCMiscGetXIDList(client); } diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index de8274469..4b63a13a1 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -307,13 +307,13 @@ ProcXF86BigfontQueryVersion( ; /* may add more bits here in future versions */ if (client->swapped) { char tmp; - swaps(&reply.sequenceNumber, tmp); - swapl(&reply.length, tmp); - swaps(&reply.majorVersion, tmp); - swaps(&reply.minorVersion, tmp); - swapl(&reply.uid, tmp); - swapl(&reply.gid, tmp); - swapl(&reply.signature, tmp); + swaps(&reply.sequenceNumber); + swapl(&reply.length); + swaps(&reply.majorVersion); + swaps(&reply.minorVersion); + swapl(&reply.uid); + swapl(&reply.gid); + swapl(&reply.signature); } WriteToClient(client, sizeof(xXF86BigfontQueryVersionReply), (char *)&reply); @@ -326,12 +326,12 @@ swapCharInfo( { char tmp; - swaps(&pCI->leftSideBearing, tmp); - swaps(&pCI->rightSideBearing, tmp); - swaps(&pCI->characterWidth, tmp); - swaps(&pCI->ascent, tmp); - swaps(&pCI->descent, tmp); - swaps(&pCI->attributes, tmp); + swaps(&pCI->leftSideBearing); + swaps(&pCI->rightSideBearing); + swaps(&pCI->characterWidth); + swaps(&pCI->ascent); + swaps(&pCI->descent); + swaps(&pCI->attributes); } /* static CARD32 hashCI (xCharInfo *p); */ @@ -587,20 +587,20 @@ ProcXF86BigfontQueryFont( reply->shmsegoffset = 0; if (client->swapped) { char tmp; - swaps(&reply->sequenceNumber, tmp); - swapl(&reply->length, tmp); + swaps(&reply->sequenceNumber); + swapl(&reply->length); swapCharInfo(&reply->minBounds); swapCharInfo(&reply->maxBounds); - swaps(&reply->minCharOrByte2, tmp); - swaps(&reply->maxCharOrByte2, tmp); - swaps(&reply->defaultChar, tmp); - swaps(&reply->nFontProps, tmp); - swaps(&reply->fontAscent, tmp); - swaps(&reply->fontDescent, tmp); - swapl(&reply->nCharInfos, tmp); - swapl(&reply->nUniqCharInfos, tmp); - swapl(&reply->shmid, tmp); - swapl(&reply->shmsegoffset, tmp); + swaps(&reply->minCharOrByte2); + swaps(&reply->maxCharOrByte2); + swaps(&reply->defaultChar); + swaps(&reply->nFontProps); + swaps(&reply->fontAscent); + swaps(&reply->fontDescent); + swapl(&reply->nCharInfos); + swapl(&reply->nUniqCharInfos); + swapl(&reply->shmid); + swapl(&reply->shmsegoffset); } p = (char*) &reply[1]; { @@ -614,8 +614,8 @@ ProcXF86BigfontQueryFont( prFP->value = pFP->value; if (client->swapped) { char tmp; - swapl(&prFP->name, tmp); - swapl(&prFP->value, tmp); + swapl(&prFP->name); + swapl(&prFP->value); } } p = (char*) prFP; @@ -635,7 +635,7 @@ ProcXF86BigfontQueryFont( *ps = pIndex2UniqIndex[j]; if (client->swapped) { char tmp; - swaps(ps, tmp); + swaps(ps); } } } @@ -672,7 +672,7 @@ SProcXF86BigfontQueryVersion( REQUEST(xXF86BigfontQueryVersionReq); char tmp; - swaps(&stuff->length, tmp); + swaps(&stuff->length); return ProcXF86BigfontQueryVersion(client); } @@ -683,9 +683,9 @@ SProcXF86BigfontQueryFont( REQUEST(xXF86BigfontQueryFontReq); char tmp; - swaps(&stuff->length, tmp); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq); - swapl(&stuff->id, tmp); + swapl(&stuff->id); return ProcXF86BigfontQueryFont(client); } diff --git a/Xext/xres.c b/Xext/xres.c index 06639a2cf..b95272882 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -28,26 +28,19 @@ ProcXResQueryVersion (ClientPtr client) { REQUEST(xXResQueryVersionReq); xXResQueryVersionReply rep; - CARD16 client_major, client_minor; /* not used */ REQUEST_SIZE_MATCH (xXResQueryVersionReq); - client_major = stuff->client_major; - client_minor = stuff->client_minor; - (void) client_major; - (void) client_minor; - rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.server_major = SERVER_XRES_MAJOR_VERSION; rep.server_minor = SERVER_XRES_MINOR_VERSION; if (client->swapped) { - int n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.server_major, n); - swaps(&rep.server_minor, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.server_major); + swaps(&rep.server_minor); } WriteToClient(client, sizeof (xXResQueryVersionReply), (char *)&rep); return Success; @@ -78,10 +71,9 @@ ProcXResQueryClients (ClientPtr client) rep.num_clients = num_clients; rep.length = bytes_to_int32(rep.num_clients * sz_xXResClient); if (client->swapped) { - int n; - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.num_clients, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.num_clients); } WriteToClient (client, sizeof (xXResQueryClientsReply), (char *) &rep); @@ -93,9 +85,8 @@ ProcXResQueryClients (ClientPtr client) scratch.resource_mask = RESOURCE_ID_MASK; if(client->swapped) { - int n; - swapl (&scratch.resource_base, n); - swapl (&scratch.resource_mask, n); + swapl(&scratch.resource_base); + swapl(&scratch.resource_mask); } WriteToClient (client, sz_xXResClient, (char *) &scratch); } @@ -147,10 +138,9 @@ ProcXResQueryClientResources (ClientPtr client) rep.num_types = num_types; rep.length = bytes_to_int32(rep.num_types * sz_xXResType); if (client->swapped) { - int n; - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.num_types, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.num_types); } WriteToClient (client,sizeof(xXResQueryClientResourcesReply),(char*)&rep); @@ -174,9 +164,8 @@ ProcXResQueryClientResources (ClientPtr client) scratch.count = counts[i]; if(client->swapped) { - int n; - swapl (&scratch.resource_type, n); - swapl (&scratch.count, n); + swapl(&scratch.resource_type); + swapl(&scratch.count); } WriteToClient (client, sz_xXResType, (char *) &scratch); } @@ -287,11 +276,10 @@ ProcXResQueryClientPixmapBytes (ClientPtr client) rep.bytes_overflow = 0; #endif if (client->swapped) { - int n; - swaps (&rep.sequenceNumber, n); - swapl (&rep.length, n); - swapl (&rep.bytes, n); - swapl (&rep.bytes_overflow, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swapl(&rep.bytes); + swapl(&rep.bytes_overflow); } WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),(char*)&rep); @@ -321,11 +309,7 @@ static int SProcXResQueryVersion (ClientPtr client) { REQUEST(xXResQueryVersionReq); - int n; - REQUEST_SIZE_MATCH (xXResQueryVersionReq); - swaps(&stuff->client_major,n); - swaps(&stuff->client_minor,n); return ProcXResQueryVersion(client); } @@ -333,10 +317,8 @@ static int SProcXResQueryClientResources (ClientPtr client) { REQUEST(xXResQueryClientResourcesReq); - int n; - REQUEST_SIZE_MATCH (xXResQueryClientResourcesReq); - swaps(&stuff->xid,n); + swapl(&stuff->xid); return ProcXResQueryClientResources(client); } @@ -344,10 +326,8 @@ static int SProcXResQueryClientPixmapBytes (ClientPtr client) { REQUEST(xXResQueryClientPixmapBytesReq); - int n; - REQUEST_SIZE_MATCH (xXResQueryClientPixmapBytesReq); - swaps(&stuff->xid,n); + swapl(&stuff->xid); return ProcXResQueryClientPixmapBytes(client); } @@ -355,9 +335,7 @@ static int SProcResDispatch (ClientPtr client) { REQUEST(xReq); - int n; - - swaps(&stuff->length,n); + swaps(&stuff->length); switch (stuff->data) { case X_XResQueryVersion: diff --git a/Xext/xselinux_ext.c b/Xext/xselinux_ext.c index 374571c4b..56f2d1ff2 100644 --- a/Xext/xselinux_ext.c +++ b/Xext/xselinux_ext.c @@ -71,11 +71,10 @@ ProcSELinuxQueryVersion(ClientPtr client) rep.server_major = SELINUX_MAJOR_VERSION; rep.server_minor = SELINUX_MINOR_VERSION; if (client->swapped) { - int n; - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.server_major, n); - swaps(&rep.server_minor, n); + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.server_major); + swaps(&rep.server_minor); } WriteToClient(client, sizeof(rep), (char *)&rep); return Success; @@ -100,10 +99,9 @@ SELinuxSendContextReply(ClientPtr client, security_id_t sid) rep.context_len = len; if (client->swapped) { - int n; - swapl(&rep.length, n); - swaps(&rep.sequenceNumber, n); - swapl(&rep.context_len, n); + swapl(&rep.length); + swaps(&rep.sequenceNumber); + swapl(&rep.context_len); } WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep); @@ -353,17 +351,17 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items, for (k = 0; k < count; k++) { buf[pos] = items[k].id; if (client->swapped) - swapl(buf + pos, n); + swapl(buf + pos); pos++; buf[pos] = items[k].octx_len * 4; if (client->swapped) - swapl(buf + pos, n); + swapl(buf + pos); pos++; buf[pos] = items[k].dctx_len * 4; if (client->swapped) - swapl(buf + pos, n); + swapl(buf + pos); pos++; memcpy((char *)(buf + pos), items[k].octx, strlen(items[k].octx) + 1); @@ -379,9 +377,9 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items, rep.count = count; if (client->swapped) { - swapl(&rep.length, n); - swaps(&rep.sequenceNumber, n); - swapl(&rep.count, n); + swapl(&rep.length); + swaps(&rep.sequenceNumber); + swapl(&rep.count); } WriteToClient(client, sizeof(SELinuxListItemsReply), (char *)&rep); @@ -529,11 +527,10 @@ static int SProcSELinuxQueryVersion(ClientPtr client) { REQUEST(SELinuxQueryVersionReq); - int n; REQUEST_SIZE_MATCH(SELinuxQueryVersionReq); - swaps(&stuff->client_major, n); - swaps(&stuff->client_minor, n); + swaps(&stuff->client_major); + swaps(&stuff->client_minor); return ProcSELinuxQueryVersion(client); } @@ -541,10 +538,9 @@ static int SProcSELinuxSetCreateContext(ClientPtr client, unsigned offset) { REQUEST(SELinuxSetCreateContextReq); - int n; REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); - swapl(&stuff->context_len, n); + swapl(&stuff->context_len); return ProcSELinuxSetCreateContext(client, offset); } @@ -552,11 +548,10 @@ static int SProcSELinuxSetDeviceContext(ClientPtr client) { REQUEST(SELinuxSetContextReq); - int n; REQUEST_AT_LEAST_SIZE(SELinuxSetContextReq); - swapl(&stuff->id, n); - swapl(&stuff->context_len, n); + swapl(&stuff->id); + swapl(&stuff->context_len); return ProcSELinuxSetDeviceContext(client); } @@ -564,10 +559,9 @@ static int SProcSELinuxGetDeviceContext(ClientPtr client) { REQUEST(SELinuxGetContextReq); - int n; REQUEST_SIZE_MATCH(SELinuxGetContextReq); - swapl(&stuff->id, n); + swapl(&stuff->id); return ProcSELinuxGetDeviceContext(client); } @@ -575,10 +569,9 @@ static int SProcSELinuxGetDrawableContext(ClientPtr client) { REQUEST(SELinuxGetContextReq); - int n; REQUEST_SIZE_MATCH(SELinuxGetContextReq); - swapl(&stuff->id, n); + swapl(&stuff->id); return ProcSELinuxGetDrawableContext(client); } @@ -586,11 +579,10 @@ static int SProcSELinuxGetPropertyContext(ClientPtr client, pointer privKey) { REQUEST(SELinuxGetPropertyContextReq); - int n; REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq); - swapl(&stuff->window, n); - swapl(&stuff->property, n); + swapl(&stuff->window); + swapl(&stuff->property); return ProcSELinuxGetPropertyContext(client, privKey); } @@ -598,10 +590,9 @@ static int SProcSELinuxGetSelectionContext(ClientPtr client, pointer privKey) { REQUEST(SELinuxGetContextReq); - int n; REQUEST_SIZE_MATCH(SELinuxGetContextReq); - swapl(&stuff->id, n); + swapl(&stuff->id); return ProcSELinuxGetSelectionContext(client, privKey); } @@ -609,10 +600,9 @@ static int SProcSELinuxListProperties(ClientPtr client) { REQUEST(SELinuxGetContextReq); - int n; REQUEST_SIZE_MATCH(SELinuxGetContextReq); - swapl(&stuff->id, n); + swapl(&stuff->id); return ProcSELinuxListProperties(client); } @@ -620,10 +610,9 @@ static int SProcSELinuxGetClientContext(ClientPtr client) { REQUEST(SELinuxGetContextReq); - int n; REQUEST_SIZE_MATCH(SELinuxGetContextReq); - swapl(&stuff->id, n); + swapl(&stuff->id); return ProcSELinuxGetClientContext(client); } @@ -631,9 +620,8 @@ static int SProcSELinuxDispatch(ClientPtr client) { REQUEST(xReq); - int n; - swaps(&stuff->length, n); + swaps(&stuff->length); switch (stuff->data) { case X_SELinuxQueryVersion: diff --git a/Xext/xtest.c b/Xext/xtest.c index cc675c116..945e202d6 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -91,7 +91,6 @@ static int ProcXTestGetVersion(ClientPtr client) { xXTestGetVersionReply rep; - int n; REQUEST_SIZE_MATCH(xXTestGetVersionReq); rep.type = X_Reply; @@ -100,8 +99,8 @@ ProcXTestGetVersion(ClientPtr client) rep.majorVersion = XTestMajorVersion; rep.minorVersion = XTestMinorVersion; if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swaps(&rep.minorVersion, n); + swaps(&rep.sequenceNumber); + swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep); return Success; @@ -114,7 +113,7 @@ ProcXTestCompareCursor(ClientPtr client) xXTestCompareCursorReply rep; WindowPtr pWin; CursorPtr pCursor; - int n, rc; + int rc; DeviceIntPtr ptr = PickPointer(client); REQUEST_SIZE_MATCH(xXTestCompareCursorReq); @@ -139,7 +138,7 @@ ProcXTestCompareCursor(ClientPtr client) rep.sequenceNumber = client->sequence; rep.same = (wCursor(pWin) == pCursor); if (client->swapped) { - swaps(&rep.sequenceNumber, n); + swaps(&rep.sequenceNumber); } WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep); return Success; @@ -348,7 +347,7 @@ ProcXTestFakeInput(ClientPtr client) if (client->swapped) { (void) XTestSwapFakeInput(client, (xReq *)stuff); - swaps(&stuff->length, n); + swaps(&stuff->length); } ResetCurrentRequest (client); client->sequence--; @@ -476,25 +475,23 @@ ProcXTestDispatch (ClientPtr client) static int SProcXTestGetVersion(ClientPtr client) { - int n; REQUEST(xXTestGetVersionReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestGetVersionReq); - swaps(&stuff->minorVersion, n); + swaps(&stuff->minorVersion); return ProcXTestGetVersion(client); } static int SProcXTestCompareCursor(ClientPtr client) { - int n; REQUEST(xXTestCompareCursorReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestCompareCursorReq); - swapl(&stuff->window, n); - swapl(&stuff->cursor, n); + swapl(&stuff->window); + swapl(&stuff->cursor); return ProcXTestCompareCursor(client); } @@ -525,10 +522,10 @@ XTestSwapFakeInput(ClientPtr client, xReq *req) static int SProcXTestFakeInput(ClientPtr client) { - int n; + int n; REQUEST(xReq); - swaps(&stuff->length, n); + swaps(&stuff->length); n = XTestSwapFakeInput(client, stuff); if (n != Success) return n; @@ -538,10 +535,9 @@ SProcXTestFakeInput(ClientPtr client) static int SProcXTestGrabControl(ClientPtr client) { - int n; REQUEST(xXTestGrabControlReq); - swaps(&stuff->length, n); + swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestGrabControlReq); return ProcXTestGrabControl(client); } diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index b96843159..364a90cf2 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -59,12 +59,10 @@ SWriteQueryExtensionReply( ClientPtr client, xvQueryExtensionReply *rep ){ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->version, n); - swaps(&rep->revision, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->version); + swaps(&rep->revision); (void)WriteToClient(client, sz_xvQueryExtensionReply, (char *)rep); @@ -76,11 +74,9 @@ SWriteQueryAdaptorsReply( ClientPtr client, xvQueryAdaptorsReply *rep ){ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->num_adaptors, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_adaptors); (void)WriteToClient(client, sz_xvQueryAdaptorsReply, (char *)rep); @@ -92,11 +88,9 @@ SWriteQueryEncodingsReply( ClientPtr client, xvQueryEncodingsReply *rep ){ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->num_encodings, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->num_encodings); (void)WriteToClient(client, sz_xvQueryEncodingsReply, (char *)rep); @@ -108,12 +102,10 @@ SWriteAdaptorInfo( ClientPtr client, xvAdaptorInfo *pAdaptor ){ - char n; - - swapl(&pAdaptor->base_id, n); - swaps(&pAdaptor->name_size, n); - swaps(&pAdaptor->num_ports, n); - swaps(&pAdaptor->num_formats, n); + swapl(&pAdaptor->base_id); + swaps(&pAdaptor->name_size); + swaps(&pAdaptor->num_ports); + swaps(&pAdaptor->num_formats); (void)WriteToClient(client, sz_xvAdaptorInfo, (char *)pAdaptor); @@ -125,14 +117,13 @@ SWriteEncodingInfo( ClientPtr client, xvEncodingInfo *pEncoding ){ - char n; - swapl(&pEncoding->encoding, n); - swaps(&pEncoding->name_size, n); - swaps(&pEncoding->width, n); - swaps(&pEncoding->height, n); - swapl(&pEncoding->rate.numerator, n); - swapl(&pEncoding->rate.denominator, n); + swapl(&pEncoding->encoding); + swaps(&pEncoding->name_size); + swaps(&pEncoding->width); + swaps(&pEncoding->height); + swapl(&pEncoding->rate.numerator); + swapl(&pEncoding->rate.denominator); (void)WriteToClient(client, sz_xvEncodingInfo, (char *)pEncoding); return Success; @@ -143,9 +134,7 @@ SWriteFormat( ClientPtr client, xvFormat *pFormat ){ - char n; - - swapl(&pFormat->visual, n); + swapl(&pFormat->visual); (void)WriteToClient(client, sz_xvFormat, (char *)pFormat); return Success; @@ -156,12 +145,10 @@ SWriteAttributeInfo( ClientPtr client, xvAttributeInfo *pAtt ){ - char n; - - swapl(&pAtt->flags, n); - swapl(&pAtt->size, n); - swapl(&pAtt->min, n); - swapl(&pAtt->max, n); + swapl(&pAtt->flags); + swapl(&pAtt->size); + swapl(&pAtt->min); + swapl(&pAtt->max); (void)WriteToClient(client, sz_xvAttributeInfo, (char *)pAtt); return Success; @@ -172,21 +159,19 @@ SWriteImageFormatInfo( ClientPtr client, xvImageFormatInfo *pImage ){ - char n; - - swapl(&pImage->id, n); - swapl(&pImage->red_mask, n); - swapl(&pImage->green_mask, n); - swapl(&pImage->blue_mask, n); - swapl(&pImage->y_sample_bits, n); - swapl(&pImage->u_sample_bits, n); - swapl(&pImage->v_sample_bits, n); - swapl(&pImage->horz_y_period, n); - swapl(&pImage->horz_u_period, n); - swapl(&pImage->horz_v_period, n); - swapl(&pImage->vert_y_period, n); - swapl(&pImage->vert_u_period, n); - swapl(&pImage->vert_v_period, n); + swapl(&pImage->id); + swapl(&pImage->red_mask); + swapl(&pImage->green_mask); + swapl(&pImage->blue_mask); + swapl(&pImage->y_sample_bits); + swapl(&pImage->u_sample_bits); + swapl(&pImage->v_sample_bits); + swapl(&pImage->horz_y_period); + swapl(&pImage->horz_u_period); + swapl(&pImage->horz_v_period); + swapl(&pImage->vert_y_period); + swapl(&pImage->vert_u_period); + swapl(&pImage->vert_v_period); (void)WriteToClient(client, sz_xvImageFormatInfo, (char *)pImage); @@ -198,10 +183,8 @@ SWriteGrabPortReply( ClientPtr client, xvGrabPortReply *rep ){ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); (void)WriteToClient(client, sz_xvGrabPortReply, (char *)rep); @@ -213,11 +196,9 @@ SWriteGetPortAttributeReply( ClientPtr client, xvGetPortAttributeReply *rep ){ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->value, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->value); (void)WriteToClient(client, sz_xvGetPortAttributeReply, (char *)rep); @@ -229,12 +210,10 @@ SWriteQueryBestSizeReply( ClientPtr client, xvQueryBestSizeReply *rep ){ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swaps(&rep->actual_width, n); - swaps(&rep->actual_height, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swaps(&rep->actual_width); + swaps(&rep->actual_height); (void)WriteToClient(client, sz_xvQueryBestSizeReply, (char *)rep); @@ -246,12 +225,10 @@ SWriteQueryPortAttributesReply( ClientPtr client, xvQueryPortAttributesReply *rep ){ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_attributes, n); - swapl(&rep->text_size, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_attributes); + swapl(&rep->text_size); (void)WriteToClient(client, sz_xvQueryPortAttributesReply, (char *)rep); @@ -263,14 +240,12 @@ SWriteQueryImageAttributesReply( ClientPtr client, xvQueryImageAttributesReply *rep ){ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_planes, n); - swapl(&rep->data_size, n); - swaps(&rep->width, n); - swaps(&rep->height, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_planes); + swapl(&rep->data_size); + swaps(&rep->width); + swaps(&rep->height); (void)WriteToClient(client, sz_xvQueryImageAttributesReply, (char *)rep); @@ -282,11 +257,9 @@ SWriteListImageFormatsReply( ClientPtr client, xvListImageFormatsReply *rep ){ - char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - swapl(&rep->num_formats, n); + swaps(&rep->sequenceNumber); + swapl(&rep->length); + swapl(&rep->num_formats); (void)WriteToClient(client, sz_xvListImageFormatsReply, (char *)rep); @@ -1278,154 +1251,144 @@ ProcXvDispatch(ClientPtr client) static int SProcXvQueryExtension(ClientPtr client) { - char n; REQUEST(xvQueryExtensionReq); - swaps(&stuff->length, n); + swaps(&stuff->length); return XvProcVector[xv_QueryExtension](client); } static int SProcXvQueryAdaptors(ClientPtr client) { - char n; REQUEST(xvQueryAdaptorsReq); - swaps(&stuff->length, n); - swapl(&stuff->window, n); + swaps(&stuff->length); + swapl(&stuff->window); return XvProcVector[xv_QueryAdaptors](client); } static int SProcXvQueryEncodings(ClientPtr client) { - char n; REQUEST(xvQueryEncodingsReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return XvProcVector[xv_QueryEncodings](client); } static int SProcXvGrabPort(ClientPtr client) { - char n; REQUEST(xvGrabPortReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->time, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->time); return XvProcVector[xv_GrabPort](client); } static int SProcXvUngrabPort(ClientPtr client) { - char n; REQUEST(xvUngrabPortReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->time, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->time); return XvProcVector[xv_UngrabPort](client); } static int SProcXvPutVideo(ClientPtr client) { - char n; REQUEST(xvPutVideoReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return XvProcVector[xv_PutVideo](client); } static int SProcXvPutStill(ClientPtr client) { - char n; REQUEST(xvPutStillReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return XvProcVector[xv_PutStill](client); } static int SProcXvGetVideo(ClientPtr client) { - char n; REQUEST(xvGetVideoReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return XvProcVector[xv_GetVideo](client); } static int SProcXvGetStill(ClientPtr client) { - char n; REQUEST(xvGetStillReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swaps(&stuff->vid_x, n); - swaps(&stuff->vid_y, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swaps(&stuff->vid_x); + swaps(&stuff->vid_y); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return XvProcVector[xv_GetStill](client); } static int SProcXvPutImage(ClientPtr client) { - char n; REQUEST(xvPutImageReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swapl(&stuff->id, n); - swaps(&stuff->src_x, n); - swaps(&stuff->src_y, n); - swaps(&stuff->src_w, n); - swaps(&stuff->src_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swapl(&stuff->id); + swaps(&stuff->src_x); + swaps(&stuff->src_y); + swaps(&stuff->src_w); + swaps(&stuff->src_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + swaps(&stuff->width); + swaps(&stuff->height); return XvProcVector[xv_PutImage](client); } @@ -1433,25 +1396,24 @@ SProcXvPutImage(ClientPtr client) static int SProcXvShmPutImage(ClientPtr client) { - char n; REQUEST(xvShmPutImageReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); - swapl(&stuff->gc, n); - swapl(&stuff->shmseg, n); - swapl(&stuff->id, n); - swapl(&stuff->offset, n); - swaps(&stuff->src_x, n); - swaps(&stuff->src_y, n); - swaps(&stuff->src_w, n); - swaps(&stuff->src_h, n); - swaps(&stuff->drw_x, n); - swaps(&stuff->drw_y, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); + swapl(&stuff->gc); + swapl(&stuff->shmseg); + swapl(&stuff->id); + swapl(&stuff->offset); + swaps(&stuff->src_x); + swaps(&stuff->src_y); + swaps(&stuff->src_w); + swaps(&stuff->src_h); + swaps(&stuff->drw_x); + swaps(&stuff->drw_y); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); + swaps(&stuff->width); + swaps(&stuff->height); return XvProcVector[xv_ShmPutImage](client); } #else /* MITSHM */ @@ -1461,101 +1423,92 @@ SProcXvShmPutImage(ClientPtr client) static int SProcXvSelectVideoNotify(ClientPtr client) { - char n; REQUEST(xvSelectVideoNotifyReq); - swaps(&stuff->length, n); - swapl(&stuff->drawable, n); + swaps(&stuff->length); + swapl(&stuff->drawable); return XvProcVector[xv_SelectVideoNotify](client); } static int SProcXvSelectPortNotify(ClientPtr client) { - char n; REQUEST(xvSelectPortNotifyReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return XvProcVector[xv_SelectPortNotify](client); } static int SProcXvStopVideo(ClientPtr client) { - char n; REQUEST(xvStopVideoReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->drawable, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->drawable); return XvProcVector[xv_StopVideo](client); } static int SProcXvSetPortAttribute(ClientPtr client) { - char n; REQUEST(xvSetPortAttributeReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->attribute, n); - swapl(&stuff->value, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->attribute); + swapl(&stuff->value); return XvProcVector[xv_SetPortAttribute](client); } static int SProcXvGetPortAttribute(ClientPtr client) { - char n; REQUEST(xvGetPortAttributeReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->attribute, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->attribute); return XvProcVector[xv_GetPortAttribute](client); } static int SProcXvQueryBestSize(ClientPtr client) { - char n; REQUEST(xvQueryBestSizeReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swaps(&stuff->vid_w, n); - swaps(&stuff->vid_h, n); - swaps(&stuff->drw_w, n); - swaps(&stuff->drw_h, n); + swaps(&stuff->length); + swapl(&stuff->port); + swaps(&stuff->vid_w); + swaps(&stuff->vid_h); + swaps(&stuff->drw_w); + swaps(&stuff->drw_h); return XvProcVector[xv_QueryBestSize](client); } static int SProcXvQueryPortAttributes(ClientPtr client) { - char n; REQUEST(xvQueryPortAttributesReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return XvProcVector[xv_QueryPortAttributes](client); } static int SProcXvQueryImageAttributes(ClientPtr client) { - char n; REQUEST(xvQueryImageAttributesReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); - swapl(&stuff->id, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); + swaps(&stuff->length); + swapl(&stuff->port); + swapl(&stuff->id); + swaps(&stuff->width); + swaps(&stuff->height); return XvProcVector[xv_QueryImageAttributes](client); } static int SProcXvListImageFormats(ClientPtr client) { - char n; REQUEST(xvListImageFormatsReq); - swaps(&stuff->length, n); - swapl(&stuff->port, n); + swaps(&stuff->length); + swapl(&stuff->port); return XvProcVector[xv_ListImageFormats](client); } |