From 2f5caeaddb3616dc9ff57d784f7feba589c536e7 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 9 Jul 2012 19:12:43 -0700 Subject: Use C99 designated initializers in Xinput Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone --- Xi/getmmap.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Xi/getmmap.c') diff --git a/Xi/getmmap.c b/Xi/getmmap.c index 97d4c0d87..f07f2bb5c 100644 --- a/Xi/getmmap.c +++ b/Xi/getmmap.c @@ -101,12 +101,14 @@ ProcXGetDeviceModifierMapping(ClientPtr client) if (ret != Success) return ret; - rep.repType = X_Reply; - rep.RepType = X_GetDeviceModifierMapping; - rep.numKeyPerModifier = max_keys_per_mod; - rep.sequenceNumber = client->sequence; + rep = (xGetDeviceModifierMappingReply) { + .repType = X_Reply, + .RepType = X_GetDeviceModifierMapping, + .sequenceNumber = client->sequence, + .numKeyPerModifier = max_keys_per_mod, /* length counts 4 byte quantities - there are 8 modifiers 1 byte big */ - rep.length = max_keys_per_mod << 1; + .length = max_keys_per_mod << 1 + }; WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); WriteToClient(client, max_keys_per_mod * 8, modkeymap); -- cgit v1.2.3