aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/xcmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/xcmisc.c')
-rw-r--r--xorg-server/Xext/xcmisc.c38
1 files changed, 17 insertions, 21 deletions
diff --git a/xorg-server/Xext/xcmisc.c b/xorg-server/Xext/xcmisc.c
index 034bfb63b..a48f61282 100644
--- a/xorg-server/Xext/xcmisc.c
+++ b/xorg-server/Xext/xcmisc.c
@@ -45,16 +45,14 @@ from The Open Group.
static int
ProcXCMiscGetVersion(ClientPtr client)
{
- xXCMiscGetVersionReply rep = {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- .majorVersion = XCMiscMajorVersion,
- .minorVersion = XCMiscMinorVersion
- };
+ xXCMiscGetVersionReply rep;
REQUEST_SIZE_MATCH(xXCMiscGetVersionReq);
-
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.majorVersion = XCMiscMajorVersion;
+ rep.minorVersion = XCMiscMinorVersion;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swaps(&rep.majorVersion);
@@ -72,13 +70,12 @@ ProcXCMiscGetXIDRange(ClientPtr client)
REQUEST_SIZE_MATCH(xXCMiscGetXIDRangeReq);
GetXIDRange(client->index, FALSE, &min_id, &max_id);
- rep = (xXCMiscGetXIDRangeReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = 0,
- .start_id = min_id,
- .count = max_id - min_id + 1
- };
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = 0;
+ rep.start_id = min_id;
+ rep.count = max_id - min_id + 1;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.start_id);
@@ -106,12 +103,11 @@ ProcXCMiscGetXIDList(ClientPtr client)
return BadAlloc;
}
count = GetXIDList(client, stuff->count, pids);
- rep = (xXCMiscGetXIDListReply) {
- .type = X_Reply,
- .sequenceNumber = client->sequence,
- .length = count,
- .count = count
- };
+
+ rep.type = X_Reply;
+ rep.sequenceNumber = client->sequence;
+ rep.length = count;
+ rep.count = count;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);