From efb6c40451300071844e8393ff7989dcdbc3333d Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 3 Jul 2024 15:59:46 +0200 Subject: [PATCH] Xext: bigreq: 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 --- Xext/bigreq.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Xext/bigreq.c b/Xext/bigreq.c index 0dc60c2584..7af87d3f52 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -35,6 +35,7 @@ from The Open Group. #include #include "dix/dix_priv.h" +#include "dix/request_priv.h" #include "misc.h" #include "os.h" @@ -46,15 +47,13 @@ from The Open Group. static int ProcBigReqDispatch(ClientPtr client) { - REQUEST(xBigReqEnableReq); + REQUEST_HEAD_STRUCT(xBigReqEnableReq); + xBigReqEnableReply rep; - if (client->swapped) { - swaps(&stuff->length); - } if (stuff->brReqType != X_BigReqEnable) return BadRequest; - REQUEST_SIZE_MATCH(xBigReqEnableReq); + client->big_requests = TRUE; rep = (xBigReqEnableReply) { .type = X_Reply,