mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 21:41:25 +00:00
Xext: GE: inline request swapping
It's so trivial that those few lines can easily be inlined into the actual request handler. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
470cca48d3
commit
7f4bef0174
34
Xext/geext.c
34
Xext/geext.c
@@ -73,6 +73,11 @@ ProcGEQueryVersion(ClientPtr client)
|
||||
REQUEST(xGEQueryVersionReq);
|
||||
REQUEST_SIZE_MATCH(xGEQueryVersionReq);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&stuff->majorVersion);
|
||||
swaps(&stuff->minorVersion);
|
||||
}
|
||||
|
||||
xGEQueryVersionReply reply = {
|
||||
.RepType = X_GEQueryVersion,
|
||||
/* return the supported version by the server */
|
||||
@@ -93,19 +98,6 @@ ProcGEQueryVersion(ClientPtr client)
|
||||
return Success;
|
||||
}
|
||||
|
||||
/************************************************************/
|
||||
/* swapped request handlers */
|
||||
/************************************************************/
|
||||
static int _X_COLD
|
||||
SProcGEQueryVersion(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGEQueryVersionReq);
|
||||
REQUEST_SIZE_MATCH(xGEQueryVersionReq);
|
||||
swaps(&stuff->majorVersion);
|
||||
swaps(&stuff->minorVersion);
|
||||
return ProcGEQueryVersion(client);
|
||||
}
|
||||
|
||||
/************************************************************/
|
||||
/* callbacks */
|
||||
/************************************************************/
|
||||
@@ -124,20 +116,6 @@ ProcGEDispatch(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
/* dispatch swapped requests */
|
||||
static int _X_COLD
|
||||
SProcGEDispatch(ClientPtr client)
|
||||
{
|
||||
REQUEST(xReq);
|
||||
|
||||
switch (stuff->data) {
|
||||
case X_GEQueryVersion:
|
||||
return SProcGEQueryVersion(client);
|
||||
default:
|
||||
return BadRequest;
|
||||
}
|
||||
}
|
||||
|
||||
/* Reset extension. Called on server shutdown. */
|
||||
static void
|
||||
GEResetProc(ExtensionEntry * extEntry)
|
||||
@@ -178,7 +156,7 @@ GEExtensionInit(void)
|
||||
(&GEClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(GEClientInfoRec)))
|
||||
FatalError("GEExtensionInit: GE private request failed.\n");
|
||||
|
||||
if (!AddExtension(GE_NAME, 0, GENumberErrors, ProcGEDispatch, SProcGEDispatch,
|
||||
if (!AddExtension(GE_NAME, 0, GENumberErrors, ProcGEDispatch, ProcGEDispatch,
|
||||
GEResetProc, StandardMinorOpcode))
|
||||
FatalError("GEInit: AddExtensions failed.\n");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user