aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/listdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xi/listdev.c')
-rw-r--r--xorg-server/Xi/listdev.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/xorg-server/Xi/listdev.c b/xorg-server/Xi/listdev.c
index a02112f32..014c61db0 100644
--- a/xorg-server/Xi/listdev.c
+++ b/xorg-server/Xi/listdev.c
@@ -342,11 +342,12 @@ ProcXListInputDevices(ClientPtr client)
REQUEST_SIZE_MATCH(xListInputDevicesReq);
- memset(&rep, 0, sizeof(xListInputDevicesReply));
- rep.repType = X_Reply;
- rep.RepType = X_ListInputDevices;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
+ rep = (xListInputDevicesReply) {
+ .repType = X_Reply,
+ .RepType = X_ListInputDevices,
+ .sequenceNumber = client->sequence,
+ .length = 0
+ };
/* allocate space for saving skip value */
skip = calloc(sizeof(Bool), inputInfo.numDevices);
@@ -417,5 +418,5 @@ SRepXListInputDevices(ClientPtr client, int size, xListInputDevicesReply * rep)
{
swaps(&rep->sequenceNumber);
swapl(&rep->length);
- WriteToClient(client, size, (char *) rep);
+ WriteToClient(client, size, rep);
}