summaryrefslogtreecommitdiff
path: root/xfixes
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 /xfixes
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 'xfixes')
-rw-r--r--xfixes/cursor.c12
-rw-r--r--xfixes/xfixes.c10
2 files changed, 12 insertions, 10 deletions
diff --git a/xfixes/cursor.c b/xfixes/cursor.c
index 402456db0..68f7b740d 100644
--- a/xfixes/cursor.c
+++ b/xfixes/cursor.c
@@ -474,11 +474,13 @@ ProcXFixesGetCursorName(ClientPtr client)
str = "";
len = strlen(str);
- reply.type = X_Reply;
- reply.length = bytes_to_int32(len);
- reply.sequenceNumber = client->sequence;
- reply.atom = pCursor->name;
- reply.nbytes = len;
+ reply = (xXFixesGetCursorNameReply) {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = bytes_to_int32(len),
+ .atom = pCursor->name,
+ .nbytes = len
+ };
if (client->swapped) {
swaps(&reply.sequenceNumber);
swapl(&reply.length);
diff --git a/xfixes/xfixes.c b/xfixes/xfixes.c
index 54f84f41d..c6dd19eb3 100644
--- a/xfixes/xfixes.c
+++ b/xfixes/xfixes.c
@@ -61,15 +61,15 @@ static int
ProcXFixesQueryVersion(ClientPtr client)
{
XFixesClientPtr pXFixesClient = GetXFixesClient(client);
- xXFixesQueryVersionReply rep;
+ xXFixesQueryVersionReply rep = {
+ .type = X_Reply,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
REQUEST(xXFixesQueryVersionReq);
REQUEST_SIZE_MATCH(xXFixesQueryVersionReq);
- memset(&rep, 0, sizeof(xXFixesQueryVersionReply));
- rep.type = X_Reply;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
if (version_compare(stuff->majorVersion, stuff->minorVersion,
SERVER_XFIXES_MAJOR_VERSION,