mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
Xext: geext: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping much easier. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
2e6a9a1fbc
commit
6f7aa46c51
12
Xext/geext.c
12
Xext/geext.c
@@ -67,16 +67,12 @@ static void SGEGenericEvent(xEvent *from, xEvent *to);
|
|||||||
static int
|
static int
|
||||||
ProcGEQueryVersion(ClientPtr client)
|
ProcGEQueryVersion(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
X_REQUEST_HEAD_STRUCT(xGEQueryVersionReq);
|
||||||
|
X_REQUEST_FIELD_CARD16(majorVersion);
|
||||||
|
X_REQUEST_FIELD_CARD16(minorVersion);
|
||||||
|
|
||||||
GEClientInfoPtr pGEClient = GEGetClient(client);
|
GEClientInfoPtr pGEClient = GEGetClient(client);
|
||||||
|
|
||||||
REQUEST(xGEQueryVersionReq);
|
|
||||||
REQUEST_SIZE_MATCH(xGEQueryVersionReq);
|
|
||||||
|
|
||||||
if (client->swapped) {
|
|
||||||
swaps(&stuff->majorVersion);
|
|
||||||
swaps(&stuff->minorVersion);
|
|
||||||
}
|
|
||||||
|
|
||||||
xGEQueryVersionReply reply = {
|
xGEQueryVersionReply reply = {
|
||||||
.RepType = X_GEQueryVersion,
|
.RepType = X_GEQueryVersion,
|
||||||
/* return the supported version by the server */
|
/* return the supported version by the server */
|
||||||
|
|||||||
Reference in New Issue
Block a user