mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
Xi: drop SWAPIF macro
Trivial enough for just writing the actual code. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
f5a70d968c
commit
d2e5ed2a89
@@ -424,8 +424,6 @@ attach_slave(ClientPtr client, xXIAttachSlaveInfo * c, int flags[MAXDEVICES])
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SWAPIF(cmd) if (client->swapped) { cmd; }
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXIChangeHierarchy(ClientPtr client)
|
ProcXIChangeHierarchy(ClientPtr client)
|
||||||
{
|
{
|
||||||
@@ -454,8 +452,10 @@ ProcXIChangeHierarchy(ClientPtr client)
|
|||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
|
|
||||||
SWAPIF(swaps(&any->type));
|
if (client->swapped) {
|
||||||
SWAPIF(swaps(&any->length));
|
swaps(&any->type);
|
||||||
|
swaps(&any->length);
|
||||||
|
}
|
||||||
|
|
||||||
if (len < ((size_t)any->length << 2))
|
if (len < ((size_t)any->length << 2))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
@@ -478,7 +478,10 @@ ProcXIChangeHierarchy(ClientPtr client)
|
|||||||
rc = BadLength;
|
rc = BadLength;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
}
|
}
|
||||||
SWAPIF(swaps(&c->name_len));
|
|
||||||
|
if (client->swapped)
|
||||||
|
swaps(&c->name_len);
|
||||||
|
|
||||||
if (c->name_len > (len - sizeof(xXIAddMasterInfo))) {
|
if (c->name_len > (len - sizeof(xXIAddMasterInfo))) {
|
||||||
rc = BadLength;
|
rc = BadLength;
|
||||||
goto unwind;
|
goto unwind;
|
||||||
|
|||||||
Reference in New Issue
Block a user