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