diff options
Diffstat (limited to 'xorg-server/Xi/opendev.c')
-rw-r--r-- | xorg-server/Xi/opendev.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xorg-server/Xi/opendev.c b/xorg-server/Xi/opendev.c index 27a959d85..f3cb9a463 100644 --- a/xorg-server/Xi/opendev.c +++ b/xorg-server/Xi/opendev.c @@ -114,10 +114,6 @@ ProcXOpenDevice(ClientPtr client) if (IsMaster(dev)) return BadDevice; - memset(&rep, 0, sizeof(xOpenDeviceReply)); - rep.repType = X_Reply; - rep.RepType = X_OpenDevice; - rep.sequenceNumber = client->sequence; if (dev->key != NULL) { evbase[j].class = KeyClass; evbase[j++].event_type_base = event_base[KeyClass]; @@ -145,10 +141,14 @@ ProcXOpenDevice(ClientPtr client) } evbase[j].class = OtherClass; evbase[j++].event_type_base = event_base[OtherClass]; + 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), (char *) evbase); + WriteToClient(client, j * sizeof(xInputClassInfo), evbase); return Success; } @@ -164,5 +164,5 @@ SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *) rep); + WriteToClient(client, size, rep); } |