diff --git a/Xi/extinit.c b/Xi/extinit.c index cd445eb6d..7b8f6ad49 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -421,9 +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_OpenDevice) - SRepXOpenDevice(client, len, (xOpenDeviceReply *) rep); - else if (rep->RepType == X_SetDeviceMode) + if (rep->RepType == X_SetDeviceMode) SRepXSetDeviceMode(client, len, (xSetDeviceModeReply *) rep); else if (rep->RepType == X_GetSelectedExtensionEvents) SRepXGetSelectedExtensionEvents(client, len, diff --git a/Xi/opendev.c b/Xi/opendev.c index f768b997d..2e7b28bab 100644 --- a/Xi/opendev.c +++ b/Xi/opendev.c @@ -137,22 +137,13 @@ ProcXOpenDevice(ClientPtr client) .length = bytes_to_int32(j * sizeof(xInputClassInfo)), .num_classes = j }; - WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + + WriteToClient(client, sizeof(xOpenDeviceReply), &rep); WriteToClient(client, j * sizeof(xInputClassInfo), evbase); return Success; } - -/*********************************************************************** - * - * This procedure writes the reply for the XOpenDevice function, - * if the client and server have a different byte ordering. - * - */ - -void _X_COLD -SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - WriteToClient(client, size, rep); -} diff --git a/Xi/opendev.h b/Xi/opendev.h index 641dd7862..89b326d43 100644 --- a/Xi/opendev.h +++ b/Xi/opendev.h @@ -33,9 +33,4 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. int ProcXOpenDevice(ClientPtr /* client */ ); -void SRepXOpenDevice(ClientPtr /* client */ , - int /* size */ , - xOpenDeviceReply * /* rep */ - ); - #endif /* OPENDEV_H */