Xi: 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:
Enrico Weigelt, metux IT consult
2025-12-04 12:03:23 +01:00
committed by Enrico Weigelt
parent e8ec547b93
commit 4395caee14
48 changed files with 198 additions and 383 deletions

View File

@@ -109,8 +109,8 @@ ProcXGetDeviceControl(ClientPtr client)
{
DeviceIntPtr dev;
REQUEST(xGetDeviceControlReq);
REQUEST_SIZE_MATCH(xGetDeviceControlReq);
X_REQUEST_HEAD_STRUCT(xGetDeviceControlReq);
X_REQUEST_FIELD_CARD16(control);
int rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess);
if (rc != Success)
@@ -118,9 +118,6 @@ ProcXGetDeviceControl(ClientPtr client)
x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE };
if (rpcbuf.swapped)
swaps(&stuff->control);
switch (stuff->control) {
case DEVICE_RESOLUTION:
if (!dev->valuator)