aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/xfixes
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/xfixes')
-rw-r--r--nx-X11/programs/Xserver/xfixes/cursor.c12
-rw-r--r--nx-X11/programs/Xserver/xfixes/xfixes.c11
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;