diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index e53e6c224..74dce0da5 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -130,7 +130,6 @@ ProcXChangeDeviceControl(ClientPtr client) .repType = X_Reply, .RepType = X_ChangeDeviceControl, .sequenceNumber = client->sequence, - .length = 0, .status = Success, }; @@ -232,24 +231,11 @@ ProcXChangeDeviceControl(ClientPtr client) SendEventToAllWindows(dev, DevicePresenceNotifyMask, (xEvent *) &dpn, 1); - WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep); + if (client->swapped) { + swaps(&rep.sequenceNumber); + } + WriteToClient(client, sizeof(xChangeDeviceControlReply), &rep); } return ret; } - -/*********************************************************************** - * - * This procedure writes the reply for the xChangeDeviceControl function, - * if the client and server have a different byte ordering. - * - */ - -void _X_COLD -SRepXChangeDeviceControl(ClientPtr client, int size, - xChangeDeviceControlReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - WriteToClient(client, size, rep); -} diff --git a/Xi/chgdctl.h b/Xi/chgdctl.h index f5ca5e766..3924f7251 100644 --- a/Xi/chgdctl.h +++ b/Xi/chgdctl.h @@ -36,9 +36,4 @@ int SProcXChangeDeviceControl(ClientPtr /* client */ int ProcXChangeDeviceControl(ClientPtr /* client */ ); -void SRepXChangeDeviceControl(ClientPtr /* client */ , - int /* size */ , - xChangeDeviceControlReply * /* rep */ - ); - #endif /* CHGDCTL_H */ diff --git a/Xi/extinit.c b/Xi/extinit.c index 7a37a8ce7..a1f6392ed 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -421,10 +421,7 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) { /* All we look at is the type field */ /* This is common to all replies */ - if (rep->RepType == X_ChangeDeviceControl) - SRepXChangeDeviceControl(client, len, - (xChangeDeviceControlReply *) rep); - else if (rep->RepType == X_ListDeviceProperties) + if (rep->RepType == X_ListDeviceProperties) SRepXListDeviceProperties(client, len, (xListDevicePropertiesReply *) rep); else if (rep->RepType == X_GetDeviceProperty)