summaryrefslogtreecommitdiff
path: root/dbe
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
commitcc5f09c86f7bea23b7546c3491b2c52ce8100a71 (patch)
tree823cbe0c7406ff270500b9e332268f5780a26650 /dbe
parent2f5caeaddb3616dc9ff57d784f7feba589c536e7 (diff)
Use C99 designated initializers in various extension 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 'dbe')
-rw-r--r--dbe/dbe.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/dbe/dbe.c b/dbe/dbe.c
index d8010ffe1..8f3d1b09d 100644
--- a/dbe/dbe.c
+++ b/dbe/dbe.c
@@ -118,16 +118,16 @@ static int
ProcDbeGetVersion(ClientPtr client)
{
/* REQUEST(xDbeGetVersionReq); */
- xDbeGetVersionReply rep;
+ xDbeGetVersionReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .majorVersion = DBE_MAJOR_VERSION,
+ .minorVersion = DBE_MINOR_VERSION
+ };
REQUEST_SIZE_MATCH(xDbeGetVersionReq);
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.majorVersion = DBE_MAJOR_VERSION;
- rep.minorVersion = DBE_MINOR_VERSION;
-
if (client->swapped) {
swaps(&rep.sequenceNumber);
}
@@ -667,10 +667,12 @@ ProcDbeGetVisualInfo(ClientPtr client)
length += pScrVisInfo[i].count * sizeof(xDbeVisInfo);
}
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = bytes_to_int32(length);
- rep.m = count;
+ rep = (xDbeGetVisualInfoReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = bytes_to_int32(length),
+ .m = count
+ };
if (client->swapped) {
swaps(&rep.sequenceNumber);
@@ -755,7 +757,11 @@ static int
ProcDbeGetBackBufferAttributes(ClientPtr client)
{
REQUEST(xDbeGetBackBufferAttributesReq);
- xDbeGetBackBufferAttributesReply rep;
+ xDbeGetBackBufferAttributesReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
DbeWindowPrivPtr pDbeWindowPriv;
int rc;
@@ -771,10 +777,6 @@ ProcDbeGetBackBufferAttributes(ClientPtr client)
rep.attributes = None;
}
- rep.type = X_Reply;
- rep.sequenceNumber = client->sequence;
- rep.length = 0;
-
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);