diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-02-28 23:13:49 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2019-02-28 23:13:49 +0100 |
commit | c6b6a8fcb75023b89ec1d4b9f3ce3c9eb44764e1 (patch) | |
tree | 4d10c1e4fa88ac7a4e97044cfd697ff75a4085a0 /nx-X11/programs/Xserver/xfixes | |
parent | c81a45785970aa198736d8dc578beb2d7bbd1b2f (diff) | |
download | nx-libs-c6b6a8fcb75023b89ec1d4b9f3ce3c9eb44764e1.tar.gz nx-libs-c6b6a8fcb75023b89ec1d4b9f3ce3c9eb44764e1.tar.bz2 nx-libs-c6b6a8fcb75023b89ec1d4b9f3ce3c9eb44764e1.zip |
Use C99 designated initializers in various extension Replies
commit cc5f09c86f7bea23b7546c3491b2c52ce8100a71
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon Jul 9 19:12:43 2012 -0700
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>
Attributes ArcticaProject/nx-libs#382
Diffstat (limited to 'nx-X11/programs/Xserver/xfixes')
-rw-r--r-- | nx-X11/programs/Xserver/xfixes/cursor.c | 12 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/xfixes/xfixes.c | 11 |
2 files changed, 13 insertions, 10 deletions
diff --git a/nx-X11/programs/Xserver/xfixes/cursor.c b/nx-X11/programs/Xserver/xfixes/cursor.c index b80bd90d6..8f258e32f 100644 --- a/nx-X11/programs/Xserver/xfixes/cursor.c +++ b/nx-X11/programs/Xserver/xfixes/cursor.c @@ -456,11 +456,13 @@ ProcXFixesGetCursorName (ClientPtr client) str = ""; len = strlen (str); - reply.type = X_Reply; - reply.length = (len + 3) >> 2; - reply.sequenceNumber = client->sequence; - reply.atom = pCursor->name; - reply.nbytes = len; + reply = (xXFixesGetCursorNameReply) { + .type = X_Reply, + .sequenceNumber = client->sequence, + .length = (len + 3) >> 2, + .atom = pCursor->name, + .nbytes = len + }; if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); diff --git a/nx-X11/programs/Xserver/xfixes/xfixes.c b/nx-X11/programs/Xserver/xfixes/xfixes.c index fadaf73b2..7fe94a99c 100644 --- a/nx-X11/programs/Xserver/xfixes/xfixes.c +++ b/nx-X11/programs/Xserver/xfixes/xfixes.c @@ -56,14 +56,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 (stuff->majorVersion < SERVER_XFIXES_MAJOR_VERSION) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; |