mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
xv: inline SWriteGrabPortReply()
Instead of complex macro machinery, just move the conditional swapping directly into ProcXvGrabPort(). Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
25565daa42
commit
71713fbf50
@@ -54,17 +54,6 @@ SOFTWARE.
|
||||
unsigned long XvXRTPort;
|
||||
#endif /* XINERAMA */
|
||||
|
||||
static int
|
||||
SWriteGrabPortReply(ClientPtr client, xvGrabPortReply * rep)
|
||||
{
|
||||
swaps(&rep->sequenceNumber);
|
||||
swapl(&rep->length);
|
||||
|
||||
WriteToClient(client, sz_xvGrabPortReply, rep);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
static int
|
||||
SWriteGetPortAttributeReply(ClientPtr client, xvGetPortAttributeReply * rep)
|
||||
{
|
||||
@@ -132,10 +121,6 @@ SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep)
|
||||
return Success;
|
||||
}
|
||||
|
||||
#define _WriteGrabPortReply(_c,_d) \
|
||||
if ((_c)->swapped) SWriteGrabPortReply(_c, _d); \
|
||||
else WriteToClient(_c, sz_xvGrabPortReply, _d)
|
||||
|
||||
#define _WriteGetPortAttributeReply(_c,_d) \
|
||||
if ((_c)->swapped) SWriteGetPortAttributeReply(_c, _d); \
|
||||
else WriteToClient(_c, sz_xvGetPortAttributeReply, _d)
|
||||
@@ -543,7 +528,12 @@ ProcXvGrabPort(ClientPtr client)
|
||||
.result = result
|
||||
};
|
||||
|
||||
_WriteGrabPortReply(client, &rep);
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
}
|
||||
|
||||
WriteToClient(client, sz_xvGrabPortReply, &rep);
|
||||
|
||||
return Success;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user