mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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:
committed by
Enrico Weigelt
parent
e8ec547b93
commit
4395caee14
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user