diff --git a/Xi/extinit.c b/Xi/extinit.c index 9fe82a0a6..cd445eb6d 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_ListInputDevices) - SRepXListInputDevices(client, len, (xListInputDevicesReply *) rep); - else if (rep->RepType == X_OpenDevice) + if (rep->RepType == X_OpenDevice) SRepXOpenDevice(client, len, (xOpenDeviceReply *) rep); else if (rep->RepType == X_SetDeviceMode) SRepXSetDeviceMode(client, len, (xSetDeviceModeReply *) rep); diff --git a/Xi/listdev.c b/Xi/listdev.c index f989b8506..dc343cb35 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -384,24 +384,15 @@ ProcXListInputDevices(ClientPtr client) } rep.ndevices = numdevs; rep.length = bytes_to_int32(total_length); - WriteReplyToClient(client, sizeof(xListInputDevicesReply), &rep); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + + WriteToClient(client, sizeof(xListInputDevicesReply), &rep); WriteToClient(client, total_length, savbuf); free(savbuf); free(skip); return Success; } - -/*********************************************************************** - * - * This procedure writes the reply for the XListInputDevices function, - * if the client and server have a different byte ordering. - * - */ - -void _X_COLD -SRepXListInputDevices(ClientPtr client, int size, xListInputDevicesReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - WriteToClient(client, size, rep); -} diff --git a/Xi/listdev.h b/Xi/listdev.h index c8f91796d..65a62220d 100644 --- a/Xi/listdev.h +++ b/Xi/listdev.h @@ -35,9 +35,4 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. int ProcXListInputDevices(ClientPtr /* client */ ); -void SRepXListInputDevices(ClientPtr /* client */ , - int /* size */ , - xListInputDevicesReply * /* rep */ - ); - #endif /* LISTDEV_H */