aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/opendev.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xi/opendev.c')
-rw-r--r--xorg-server/Xi/opendev.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/xorg-server/Xi/opendev.c b/xorg-server/Xi/opendev.c
index 6708bade1..f3cb9a463 100644
--- a/xorg-server/Xi/opendev.c
+++ b/xorg-server/Xi/opendev.c
@@ -114,9 +114,6 @@ ProcXOpenDevice(ClientPtr client)
if (IsMaster(dev))
return BadDevice;
- if (status != Success)
- return status;
-
if (dev->key != NULL) {
evbase[j].class = KeyClass;
evbase[j++].event_type_base = event_base[KeyClass];
@@ -144,13 +141,12 @@ ProcXOpenDevice(ClientPtr client)
}
evbase[j].class = OtherClass;
evbase[j++].event_type_base = event_base[OtherClass];
- rep = (xOpenDeviceReply) {
- .repType = X_Reply,
- .RepType = X_OpenDevice,
- .sequenceNumber = client->sequence,
- .length = bytes_to_int32(j * sizeof(xInputClassInfo)),
- .num_classes = j
- };
+ memset(&rep, 0, sizeof(xOpenDeviceReply));
+ rep.repType = X_Reply;
+ rep.RepType = X_OpenDevice;
+ rep.sequenceNumber = client->sequence;
+ rep.length = bytes_to_int32(j * sizeof(xInputClassInfo));
+ rep.num_classes = j;
WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep);
WriteToClient(client, j * sizeof(xInputClassInfo), evbase);
return Success;