summaryrefslogtreecommitdiff
path: root/Xext/xtest.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-09 19:12:43 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-09 19:58:30 -0700
commit6a721e3af5e11bae1d59ca551a02470f35d9e844 (patch)
treeb95dd0d69fca66321f010959e69c44f781452c1f /Xext/xtest.c
parentd792ac125a0462a04a930af543cbc732f8cdab7d (diff)
Use C99 designated initializers in Xext Replies
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'Xext/xtest.c')
-rw-r--r--Xext/xtest.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/Xext/xtest.c b/Xext/xtest.c
index 6112c0b7d..c7b087bdf 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -88,14 +88,16 @@ static int XTestSwapFakeInput(ClientPtr /* client */ ,
static int
ProcXTestGetVersion(ClientPtr client)
{
- xXTestGetVersionReply rep;
+ xXTestGetVersionReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .majorVersion = XTestMajorVersion,
+ .minorVersion = XTestMinorVersion
+ };
REQUEST_SIZE_MATCH(xXTestGetVersionReq);
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.majorVersion = XTestMajorVersion;
- rep.minorVersion = XTestMinorVersion;
+
if (client->swapped) {
swaps(&rep.sequenceNumber);
swaps(&rep.minorVersion);
@@ -134,10 +136,12 @@ ProcXTestCompareCursor(ClientPtr client)
return rc;
}
}
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.same = (wCursor(pWin) == pCursor);
+ rep = (xXTestCompareCursorReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .same = (wCursor(pWin) == pCursor)
+ };
if (client->swapped) {
swaps(&rep.sequenceNumber);
}