Xext: xtest: use REPLY_*() macros for preparing / sending replies
Use the new macros for preparing and sending replies to clients. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
d929424514
commit
757f6ab8bc
26
Xext/xtest.c
26
Xext/xtest.c
|
@ -94,21 +94,12 @@ ProcXTestGetVersion(ClientPtr client)
|
||||||
REQUEST_FIELD_CARD16(minorVersion);
|
REQUEST_FIELD_CARD16(minorVersion);
|
||||||
|
|
||||||
xXTestGetVersionReply rep = {
|
xXTestGetVersionReply rep = {
|
||||||
.type = X_Reply,
|
|
||||||
.sequenceNumber = client->sequence,
|
|
||||||
.length = 0,
|
|
||||||
.majorVersion = XTestMajorVersion,
|
.majorVersion = XTestMajorVersion,
|
||||||
.minorVersion = XTestMinorVersion
|
.minorVersion = XTestMinorVersion
|
||||||
};
|
};
|
||||||
|
|
||||||
REQUEST_SIZE_MATCH(xXTestGetVersionReq);
|
REPLY_FIELD_CARD16(minorVersion);
|
||||||
|
REPLY_SEND_RET_SUCCESS();
|
||||||
if (client->swapped) {
|
|
||||||
swaps(&rep.sequenceNumber);
|
|
||||||
swaps(&rep.minorVersion);
|
|
||||||
}
|
|
||||||
WriteToClient(client, sizeof(xXTestGetVersionReply), &rep);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -118,7 +109,6 @@ ProcXTestCompareCursor(ClientPtr client)
|
||||||
REQUEST_FIELD_CARD32(window);
|
REQUEST_FIELD_CARD32(window);
|
||||||
REQUEST_FIELD_CARD32(cursor);
|
REQUEST_FIELD_CARD32(cursor);
|
||||||
|
|
||||||
xXTestCompareCursorReply rep;
|
|
||||||
WindowPtr pWin;
|
WindowPtr pWin;
|
||||||
CursorPtr pCursor;
|
CursorPtr pCursor;
|
||||||
int rc;
|
int rc;
|
||||||
|
@ -143,17 +133,11 @@ ProcXTestCompareCursor(ClientPtr client)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rep = (xXTestCompareCursorReply) {
|
|
||||||
.type = X_Reply,
|
xXTestCompareCursorReply rep = {
|
||||||
.sequenceNumber = client->sequence,
|
|
||||||
.length = 0,
|
|
||||||
.same = (wCursor(pWin) == pCursor)
|
.same = (wCursor(pWin) == pCursor)
|
||||||
};
|
};
|
||||||
if (client->swapped) {
|
REPLY_SEND_RET_SUCCESS();
|
||||||
swaps(&rep.sequenceNumber);
|
|
||||||
}
|
|
||||||
WriteToClient(client, sizeof(xXTestCompareCursorReply), &rep);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue