diff --git a/Xi/extinit.c b/Xi/extinit.c index fe1a5778f..6523dcb6f 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_GetDeviceModifierMapping) - SRepXGetDeviceModifierMapping(client, len, - (xGetDeviceModifierMappingReply *) rep); - else if (rep->RepType == X_SetDeviceModifierMapping) + if (rep->RepType == X_SetDeviceModifierMapping) SRepXSetDeviceModifierMapping(client, len, (xSetDeviceModifierMappingReply *) rep); else if (rep->RepType == X_GetDeviceButtonMapping) diff --git a/Xi/getmmap.c b/Xi/getmmap.c index ac75e83a5..dea7f8254 100644 --- a/Xi/getmmap.c +++ b/Xi/getmmap.c @@ -92,26 +92,14 @@ ProcXGetDeviceModifierMapping(ClientPtr client) .length = max_keys_per_mod << 1 }; - WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + WriteToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); WriteToClient(client, max_keys_per_mod * 8, modkeymap); free(modkeymap); return Success; } - -/*********************************************************************** - * - * This procedure writes the reply for the XGetDeviceModifierMapping function, - * if the client and server have a different byte ordering. - * - */ - -void _X_COLD -SRepXGetDeviceModifierMapping(ClientPtr client, int size, - xGetDeviceModifierMappingReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - WriteToClient(client, size, rep); -} diff --git a/Xi/getmmap.h b/Xi/getmmap.h index 7512188ec..feef7c505 100644 --- a/Xi/getmmap.h +++ b/Xi/getmmap.h @@ -33,9 +33,4 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. int ProcXGetDeviceModifierMapping(ClientPtr /* client */ ); -void SRepXGetDeviceModifierMapping(ClientPtr /* client */ , - int /* size */ , - xGetDeviceModifierMappingReply * /* rep */ - ); - #endif /* GETMMAP_H */