From d137057fd13e83ec15ab416c7fe774741da06047 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 10 Jul 2012 14:56:29 +0200 Subject: fontconfig mesa xserver git update 10 Jul 2012 --- xorg-server/Xi/opendev.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'xorg-server/Xi/opendev.c') diff --git a/xorg-server/Xi/opendev.c b/xorg-server/Xi/opendev.c index e7c00a236..6708bade1 100644 --- a/xorg-server/Xi/opendev.c +++ b/xorg-server/Xi/opendev.c @@ -117,10 +117,6 @@ ProcXOpenDevice(ClientPtr client) if (status != Success) return status; - 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]; @@ -148,10 +144,15 @@ ProcXOpenDevice(ClientPtr client) } evbase[j].class = OtherClass; evbase[j++].event_type_base = event_base[OtherClass]; - rep.length = bytes_to_int32(j * sizeof(xInputClassInfo)); - rep.num_classes = j; + rep = (xOpenDeviceReply) { + .repType = X_Reply, + .RepType = X_OpenDevice, + .sequenceNumber = client->sequence, + .length = bytes_to_int32(j * sizeof(xInputClassInfo)), + .num_classes = j + }; WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep); - WriteToClient(client, j * sizeof(xInputClassInfo), (char *) evbase); + WriteToClient(client, j * sizeof(xInputClassInfo), evbase); return Success; } @@ -167,5 +168,5 @@ SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); - WriteToClient(client, size, (char *) rep); + WriteToClient(client, size, rep); } -- cgit v1.2.3