Xext: vidmode: drop swapping request length fields

The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1639>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-08-07 13:58:38 +02:00 committed by Marge Bot
parent bf6d132df6
commit 65cb5e5575

View File

@ -1704,8 +1704,6 @@ ProcVidModeDispatch(ClientPtr client)
static int _X_COLD
SProcVidModeQueryVersion(ClientPtr client)
{
REQUEST(xXF86VidModeQueryVersionReq);
swaps(&stuff->length);
return ProcVidModeQueryVersion(client);
}
@ -1713,7 +1711,6 @@ static int _X_COLD
SProcVidModeGetModeLine(ClientPtr client)
{
REQUEST(xXF86VidModeGetModeLineReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq);
swaps(&stuff->screen);
return ProcVidModeGetModeLine(client);
@ -1723,7 +1720,6 @@ static int _X_COLD
SProcVidModeGetAllModeLines(ClientPtr client)
{
REQUEST(xXF86VidModeGetAllModeLinesReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq);
swaps(&stuff->screen);
return ProcVidModeGetAllModeLines(client);
@ -1739,7 +1735,6 @@ SProcVidModeAddModeLine(ClientPtr client)
REQUEST(xXF86VidModeAddModeLineReq);
ver = ClientMajorVersion(client);
if (ver < 2) {
swaps(&oldstuff->length);
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq);
swapl(&oldstuff->screen);
swaps(&oldstuff->hdisplay);
@ -1755,7 +1750,6 @@ SProcVidModeAddModeLine(ClientPtr client)
SwapRestL(oldstuff);
}
else {
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq);
swapl(&stuff->screen);
swaps(&stuff->hdisplay);
@ -1784,7 +1778,6 @@ SProcVidModeDeleteModeLine(ClientPtr client)
REQUEST(xXF86VidModeDeleteModeLineReq);
ver = ClientMajorVersion(client);
if (ver < 2) {
swaps(&oldstuff->length);
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq);
swapl(&oldstuff->screen);
swaps(&oldstuff->hdisplay);
@ -1800,7 +1793,6 @@ SProcVidModeDeleteModeLine(ClientPtr client)
SwapRestL(oldstuff);
}
else {
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq);
swapl(&stuff->screen);
swaps(&stuff->hdisplay);
@ -1829,7 +1821,6 @@ SProcVidModeModModeLine(ClientPtr client)
REQUEST(xXF86VidModeModModeLineReq);
ver = ClientMajorVersion(client);
if (ver < 2) {
swaps(&oldstuff->length);
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq);
swapl(&oldstuff->screen);
swaps(&oldstuff->hdisplay);
@ -1845,7 +1836,6 @@ SProcVidModeModModeLine(ClientPtr client)
SwapRestL(oldstuff);
}
else {
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq);
swapl(&stuff->screen);
swaps(&stuff->hdisplay);
@ -1874,7 +1864,6 @@ SProcVidModeValidateModeLine(ClientPtr client)
REQUEST(xXF86VidModeValidateModeLineReq);
ver = ClientMajorVersion(client);
if (ver < 2) {
swaps(&oldstuff->length);
REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq);
swapl(&oldstuff->screen);
swaps(&oldstuff->hdisplay);
@ -1890,7 +1879,6 @@ SProcVidModeValidateModeLine(ClientPtr client)
SwapRestL(oldstuff);
}
else {
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq);
swapl(&stuff->screen);
swaps(&stuff->hdisplay);
@ -1913,7 +1901,6 @@ static int _X_COLD
SProcVidModeSwitchMode(ClientPtr client)
{
REQUEST(xXF86VidModeSwitchModeReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq);
swaps(&stuff->screen);
swaps(&stuff->zoom);
@ -1924,7 +1911,6 @@ static int _X_COLD
SProcVidModeSwitchToMode(ClientPtr client)
{
REQUEST(xXF86VidModeSwitchToModeReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeSwitchToModeReq);
swapl(&stuff->screen);
return ProcVidModeSwitchToMode(client);
@ -1934,7 +1920,6 @@ static int _X_COLD
SProcVidModeLockModeSwitch(ClientPtr client)
{
REQUEST(xXF86VidModeLockModeSwitchReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq);
swaps(&stuff->screen);
swaps(&stuff->lock);
@ -1945,7 +1930,6 @@ static int _X_COLD
SProcVidModeGetMonitor(ClientPtr client)
{
REQUEST(xXF86VidModeGetMonitorReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq);
swaps(&stuff->screen);
return ProcVidModeGetMonitor(client);
@ -1955,7 +1939,6 @@ static int _X_COLD
SProcVidModeGetViewPort(ClientPtr client)
{
REQUEST(xXF86VidModeGetViewPortReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq);
swaps(&stuff->screen);
return ProcVidModeGetViewPort(client);
@ -1965,7 +1948,6 @@ static int _X_COLD
SProcVidModeSetViewPort(ClientPtr client)
{
REQUEST(xXF86VidModeSetViewPortReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq);
swaps(&stuff->screen);
swapl(&stuff->x);
@ -1977,7 +1959,6 @@ static int _X_COLD
SProcVidModeGetDotClocks(ClientPtr client)
{
REQUEST(xXF86VidModeGetDotClocksReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq);
swaps(&stuff->screen);
return ProcVidModeGetDotClocks(client);
@ -1987,7 +1968,6 @@ static int _X_COLD
SProcVidModeSetClientVersion(ClientPtr client)
{
REQUEST(xXF86VidModeSetClientVersionReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq);
swaps(&stuff->major);
swaps(&stuff->minor);
@ -1998,7 +1978,6 @@ static int _X_COLD
SProcVidModeSetGamma(ClientPtr client)
{
REQUEST(xXF86VidModeSetGammaReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq);
swaps(&stuff->screen);
swapl(&stuff->red);
@ -2011,7 +1990,6 @@ static int _X_COLD
SProcVidModeGetGamma(ClientPtr client)
{
REQUEST(xXF86VidModeGetGammaReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq);
swaps(&stuff->screen);
return ProcVidModeGetGamma(client);
@ -2023,7 +2001,6 @@ SProcVidModeSetGammaRamp(ClientPtr client)
int length;
REQUEST(xXF86VidModeSetGammaRampReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq);
swaps(&stuff->size);
swaps(&stuff->screen);
@ -2037,7 +2014,6 @@ static int _X_COLD
SProcVidModeGetGammaRamp(ClientPtr client)
{
REQUEST(xXF86VidModeGetGammaRampReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq);
swaps(&stuff->size);
swaps(&stuff->screen);
@ -2048,7 +2024,6 @@ static int _X_COLD
SProcVidModeGetGammaRampSize(ClientPtr client)
{
REQUEST(xXF86VidModeGetGammaRampSizeReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq);
swaps(&stuff->screen);
return ProcVidModeGetGammaRampSize(client);
@ -2058,7 +2033,6 @@ static int _X_COLD
SProcVidModeGetPermissions(ClientPtr client)
{
REQUEST(xXF86VidModeGetPermissionsReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq);
swaps(&stuff->screen);
return ProcVidModeGetPermissions(client);