summaryrefslogtreecommitdiff
path: root/Xi/xipassivegrab.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-09 19:12:43 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2012-07-09 19:58:30 -0700
commit2f5caeaddb3616dc9ff57d784f7feba589c536e7 (patch)
tree1909962a69a7a643c6f66b0320416cbdca191e59 /Xi/xipassivegrab.c
parent6a721e3af5e11bae1d59ca551a02470f35d9e844 (diff)
Use C99 designated initializers in Xinput Replies
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'Xi/xipassivegrab.c')
-rw-r--r--Xi/xipassivegrab.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
index 5e4fa4e60..ddab53dec 100644
--- a/Xi/xipassivegrab.c
+++ b/Xi/xipassivegrab.c
@@ -78,7 +78,13 @@ int
ProcXIPassiveGrabDevice(ClientPtr client)
{
DeviceIntPtr dev, mod_dev;
- xXIPassiveGrabDeviceReply rep;
+ xXIPassiveGrabDeviceReply rep = {
+ .repType = X_Reply,
+ .RepType = X_XIPassiveGrabDevice,
+ .sequenceNumber = client->sequence,
+ .length = 0,
+ .num_modifiers = 0
+ };
int i, ret = Success;
uint32_t *modifiers;
xXIGrabModifierInfo *modifiers_failed;
@@ -137,12 +143,6 @@ ProcXIPassiveGrabDevice(ClientPtr client)
xi2mask_set_one_mask(mask.xi2mask, stuff->deviceid,
(unsigned char *) &stuff[1], mask_len * 4);
- rep.repType = X_Reply;
- rep.RepType = X_XIPassiveGrabDevice;
- rep.length = 0;
- rep.sequenceNumber = client->sequence;
- rep.num_modifiers = 0;
-
memset(&param, 0, sizeof(param));
param.grabtype = XI2;
param.ownerEvents = stuff->owner_events;