mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00:00
xcmisc: consolidate (S)ProcXCMiscGetXIDList()
Move conditional swapping of request fields into main request handler, no extra swapped handler needed anymore. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
8ec51b64e8
commit
f1263be6b7
@@ -102,6 +102,9 @@ ProcXCMiscGetXIDList(ClientPtr client)
|
||||
REQUEST(xXCMiscGetXIDListReq);
|
||||
REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
|
||||
|
||||
if (client->swapped)
|
||||
swapl(&stuff->count);
|
||||
|
||||
if (stuff->count > UINT32_MAX / sizeof(XID))
|
||||
return BadAlloc;
|
||||
|
||||
@@ -153,16 +156,6 @@ ProcXCMiscDispatch(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXCMiscGetXIDList(ClientPtr client)
|
||||
{
|
||||
REQUEST(xXCMiscGetXIDListReq);
|
||||
REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq);
|
||||
|
||||
swapl(&stuff->count);
|
||||
return ProcXCMiscGetXIDList(client);
|
||||
}
|
||||
|
||||
static int _X_COLD
|
||||
SProcXCMiscDispatch(ClientPtr client)
|
||||
{
|
||||
@@ -173,7 +166,7 @@ SProcXCMiscDispatch(ClientPtr client)
|
||||
case X_XCMiscGetXIDRange:
|
||||
return ProcXCMiscGetXIDRange(client);
|
||||
case X_XCMiscGetXIDList:
|
||||
return SProcXCMiscGetXIDList(client);
|
||||
return ProcXCMiscGetXIDList(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user