diff --git a/Xi/allowev.c b/Xi/allowev.c index 0db7925a3..74e4ae214 100644 --- a/Xi/allowev.c +++ b/Xi/allowev.c @@ -72,7 +72,6 @@ int _X_COLD SProcXAllowDeviceEvents(ClientPtr client) { REQUEST(xAllowDeviceEventsReq); - swaps(&stuff->length); REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); swapl(&stuff->time); return (ProcXAllowDeviceEvents(client)); diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index 71fab9d8c..7fdb5d5e0 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -76,7 +76,6 @@ SProcXChangeDeviceControl(ClientPtr client) xDeviceCtl *ctl; REQUEST(xChangeDeviceControlReq); - swaps(&stuff->length); REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl)); swaps(&stuff->control); ctl = (xDeviceCtl *) &stuff[1]; diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c index c51e667fb..e1295b5fa 100644 --- a/Xi/chgfctl.c +++ b/Xi/chgfctl.c @@ -73,7 +73,6 @@ int _X_COLD SProcXChangeFeedbackControl(ClientPtr client) { REQUEST(xChangeFeedbackControlReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); swapl(&stuff->mask); return (ProcXChangeFeedbackControl(client)); diff --git a/Xi/chgkbd.c b/Xi/chgkbd.c index 098c41fa9..a196b5046 100644 --- a/Xi/chgkbd.c +++ b/Xi/chgkbd.c @@ -73,9 +73,6 @@ SOFTWARE. int _X_COLD SProcXChangeKeyboardDevice(ClientPtr client) { - REQUEST(xChangeKeyboardDeviceReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq); return (ProcXChangeKeyboardDevice(client)); } diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c index 936efc6c7..73cc8b4e2 100644 --- a/Xi/chgkmap.c +++ b/Xi/chgkmap.c @@ -75,7 +75,6 @@ SProcXChangeDeviceKeyMapping(ClientPtr client) unsigned int count; REQUEST(xChangeDeviceKeyMappingReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); count = stuff->keyCodes * stuff->keySymsPerKeyCode; REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); diff --git a/Xi/chgprop.c b/Xi/chgprop.c index f369c4d84..ab1a6b601 100644 --- a/Xi/chgprop.c +++ b/Xi/chgprop.c @@ -75,7 +75,6 @@ int _X_COLD SProcXChangeDeviceDontPropagateList(ClientPtr client) { REQUEST(xChangeDeviceDontPropagateListReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); swapl(&stuff->window); swaps(&stuff->count); diff --git a/Xi/chgptr.c b/Xi/chgptr.c index e90939092..b6e4777b9 100644 --- a/Xi/chgptr.c +++ b/Xi/chgptr.c @@ -75,9 +75,6 @@ SOFTWARE. int _X_COLD SProcXChangePointerDevice(ClientPtr client) { - REQUEST(xChangePointerDeviceReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xChangePointerDeviceReq); return (ProcXChangePointerDevice(client)); } diff --git a/Xi/closedev.c b/Xi/closedev.c index c0fb424ab..d7743f105 100644 --- a/Xi/closedev.c +++ b/Xi/closedev.c @@ -71,9 +71,6 @@ SOFTWARE. int _X_COLD SProcXCloseDevice(ClientPtr client) { - REQUEST(xCloseDeviceReq); - swaps(&stuff->length); - REQUEST_SIZE_MATCH(xCloseDeviceReq); return (ProcXCloseDevice(client)); } diff --git a/Xi/devbell.c b/Xi/devbell.c index 51facd9b6..598780e65 100644 --- a/Xi/devbell.c +++ b/Xi/devbell.c @@ -69,8 +69,6 @@ SOFTWARE. int _X_COLD SProcXDeviceBell(ClientPtr client) { - REQUEST(xDeviceBellReq); - swaps(&stuff->length); return (ProcXDeviceBell(client)); } diff --git a/Xi/getbmap.c b/Xi/getbmap.c index 01ade01c4..8344ddbc1 100644 --- a/Xi/getbmap.c +++ b/Xi/getbmap.c @@ -68,8 +68,6 @@ SOFTWARE. int _X_COLD SProcXGetDeviceButtonMapping(ClientPtr client) { - REQUEST(xGetDeviceButtonMappingReq); - swaps(&stuff->length); return (ProcXGetDeviceButtonMapping(client)); } diff --git a/Xi/getdctl.c b/Xi/getdctl.c index 98fea52de..07b6bec7e 100644 --- a/Xi/getdctl.c +++ b/Xi/getdctl.c @@ -70,7 +70,6 @@ int _X_COLD SProcXGetDeviceControl(ClientPtr client) { REQUEST(xGetDeviceControlReq); - swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetDeviceControlReq); swaps(&stuff->control); return (ProcXGetDeviceControl(client)); diff --git a/Xi/getfctl.c b/Xi/getfctl.c index 88e816975..b920de468 100644 --- a/Xi/getfctl.c +++ b/Xi/getfctl.c @@ -69,8 +69,6 @@ SOFTWARE. int _X_COLD SProcXGetFeedbackControl(ClientPtr client) { - REQUEST(xGetFeedbackControlReq); - swaps(&stuff->length); return (ProcXGetFeedbackControl(client)); } diff --git a/Xi/getfocus.c b/Xi/getfocus.c index de280ea79..41dda55b6 100644 --- a/Xi/getfocus.c +++ b/Xi/getfocus.c @@ -69,8 +69,6 @@ SOFTWARE. int _X_COLD SProcXGetDeviceFocus(ClientPtr client) { - REQUEST(xGetDeviceFocusReq); - swaps(&stuff->length); return (ProcXGetDeviceFocus(client)); } diff --git a/Xi/getkmap.c b/Xi/getkmap.c index 1352ae6c7..6288e764a 100644 --- a/Xi/getkmap.c +++ b/Xi/getkmap.c @@ -72,8 +72,6 @@ SOFTWARE. int _X_COLD SProcXGetDeviceKeyMapping(ClientPtr client) { - REQUEST(xGetDeviceKeyMappingReq); - swaps(&stuff->length); return (ProcXGetDeviceKeyMapping(client)); } diff --git a/Xi/getmmap.c b/Xi/getmmap.c index 31f723cdf..c7242d361 100644 --- a/Xi/getmmap.c +++ b/Xi/getmmap.c @@ -69,8 +69,6 @@ SOFTWARE. int _X_COLD SProcXGetDeviceModifierMapping(ClientPtr client) { - REQUEST(xGetDeviceModifierMappingReq); - swaps(&stuff->length); return (ProcXGetDeviceModifierMapping(client)); } diff --git a/Xi/getprop.c b/Xi/getprop.c index 205b4ec5c..54b8131ec 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -76,7 +76,6 @@ int _X_COLD SProcXGetDeviceDontPropagateList(ClientPtr client) { REQUEST(xGetDeviceDontPropagateListReq); - swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq); swapl(&stuff->window); return (ProcXGetDeviceDontPropagateList(client)); diff --git a/Xi/getselev.c b/Xi/getselev.c index 2e1eb906a..0abf9faa9 100644 --- a/Xi/getselev.c +++ b/Xi/getselev.c @@ -74,7 +74,6 @@ int _X_COLD SProcXGetSelectedExtensionEvents(ClientPtr client) { REQUEST(xGetSelectedExtensionEventsReq); - swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq); swapl(&stuff->window); return (ProcXGetSelectedExtensionEvents(client)); diff --git a/Xi/getvers.c b/Xi/getvers.c index 6bcca1056..0d90fc9a8 100644 --- a/Xi/getvers.c +++ b/Xi/getvers.c @@ -72,7 +72,6 @@ int _X_COLD SProcXGetExtensionVersion(ClientPtr client) { REQUEST(xGetExtensionVersionReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); swaps(&stuff->nbytes); return (ProcXGetExtensionVersion(client)); diff --git a/Xi/grabdev.c b/Xi/grabdev.c index 146d313de..ba18a716a 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -76,7 +76,6 @@ int _X_COLD SProcXGrabDevice(ClientPtr client) { REQUEST(xGrabDeviceReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xGrabDeviceReq); swapl(&stuff->grabWindow); swapl(&stuff->time); diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c index ffd55627d..9a2ef87ab 100644 --- a/Xi/grabdevb.c +++ b/Xi/grabdevb.c @@ -74,7 +74,6 @@ int _X_COLD SProcXGrabDeviceButton(ClientPtr client) { REQUEST(xGrabDeviceButtonReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c index 4e278b747..7668735ea 100644 --- a/Xi/grabdevk.c +++ b/Xi/grabdevk.c @@ -74,7 +74,6 @@ int _X_COLD SProcXGrabDeviceKey(ClientPtr client) { REQUEST(xGrabDeviceKeyReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); diff --git a/Xi/gtmotion.c b/Xi/gtmotion.c index 557dd888c..41d68ec87 100644 --- a/Xi/gtmotion.c +++ b/Xi/gtmotion.c @@ -71,7 +71,6 @@ int _X_COLD SProcXGetDeviceMotionEvents(ClientPtr client) { REQUEST(xGetDeviceMotionEventsReq); - swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq); swapl(&stuff->start); swapl(&stuff->stop); diff --git a/Xi/listdev.c b/Xi/listdev.c index 37961b6c1..a1d4a90e5 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -77,8 +77,6 @@ SOFTWARE. int _X_COLD SProcXListInputDevices(ClientPtr client) { - REQUEST(xListInputDevicesReq); - swaps(&stuff->length); return (ProcXListInputDevices(client)); } diff --git a/Xi/opendev.c b/Xi/opendev.c index 8d2e117e8..9d4e579fc 100644 --- a/Xi/opendev.c +++ b/Xi/opendev.c @@ -74,8 +74,6 @@ extern CARD8 event_base[]; int _X_COLD SProcXOpenDevice(ClientPtr client) { - REQUEST(xOpenDeviceReq); - swaps(&stuff->length); return (ProcXOpenDevice(client)); } diff --git a/Xi/queryst.c b/Xi/queryst.c index 3bfba94ae..6c665e698 100644 --- a/Xi/queryst.c +++ b/Xi/queryst.c @@ -56,8 +56,6 @@ from The Open Group. int _X_COLD SProcXQueryDeviceState(ClientPtr client) { - REQUEST(xQueryDeviceStateReq); - swaps(&stuff->length); return (ProcXQueryDeviceState(client)); } diff --git a/Xi/selectev.c b/Xi/selectev.c index a8c7f0c45..3f2a3178c 100644 --- a/Xi/selectev.c +++ b/Xi/selectev.c @@ -121,7 +121,6 @@ int _X_COLD SProcXSelectExtensionEvent(ClientPtr client) { REQUEST(xSelectExtensionEventReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); swapl(&stuff->window); swaps(&stuff->count); diff --git a/Xi/sendexev.c b/Xi/sendexev.c index d116909bb..79a93b6b7 100644 --- a/Xi/sendexev.c +++ b/Xi/sendexev.c @@ -82,7 +82,6 @@ SProcXSendExtensionEvent(ClientPtr client) EventSwapPtr proc; REQUEST(xSendExtensionEventReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); swapl(&stuff->destination); swaps(&stuff->count); diff --git a/Xi/setbmap.c b/Xi/setbmap.c index b05ae07a1..7af6e6f08 100644 --- a/Xi/setbmap.c +++ b/Xi/setbmap.c @@ -71,8 +71,6 @@ SOFTWARE. int _X_COLD SProcXSetDeviceButtonMapping(ClientPtr client) { - REQUEST(xSetDeviceButtonMappingReq); - swaps(&stuff->length); return (ProcXSetDeviceButtonMapping(client)); } diff --git a/Xi/setdval.c b/Xi/setdval.c index 26fed9094..3f8b3675e 100644 --- a/Xi/setdval.c +++ b/Xi/setdval.c @@ -71,8 +71,6 @@ SOFTWARE. int _X_COLD SProcXSetDeviceValuators(ClientPtr client) { - REQUEST(xSetDeviceValuatorsReq); - swaps(&stuff->length); return (ProcXSetDeviceValuators(client)); } diff --git a/Xi/setfocus.c b/Xi/setfocus.c index de3870201..16f969436 100644 --- a/Xi/setfocus.c +++ b/Xi/setfocus.c @@ -74,7 +74,6 @@ int _X_COLD SProcXSetDeviceFocus(ClientPtr client) { REQUEST(xSetDeviceFocusReq); - swaps(&stuff->length); REQUEST_SIZE_MATCH(xSetDeviceFocusReq); swapl(&stuff->focus); swapl(&stuff->time); diff --git a/Xi/setmmap.c b/Xi/setmmap.c index 5e6c0831f..4c1ce2c5e 100644 --- a/Xi/setmmap.c +++ b/Xi/setmmap.c @@ -73,8 +73,6 @@ SOFTWARE. int _X_COLD SProcXSetDeviceModifierMapping(ClientPtr client) { - REQUEST(xSetDeviceModifierMappingReq); - swaps(&stuff->length); return (ProcXSetDeviceModifierMapping(client)); } diff --git a/Xi/setmode.c b/Xi/setmode.c index e218eefb4..bae3838b0 100644 --- a/Xi/setmode.c +++ b/Xi/setmode.c @@ -71,8 +71,6 @@ SOFTWARE. int _X_COLD SProcXSetDeviceMode(ClientPtr client) { - REQUEST(xSetDeviceModeReq); - swaps(&stuff->length); return (ProcXSetDeviceMode(client)); } diff --git a/Xi/ungrdev.c b/Xi/ungrdev.c index 44afc47b1..e64d3b99c 100644 --- a/Xi/ungrdev.c +++ b/Xi/ungrdev.c @@ -69,7 +69,6 @@ int _X_COLD SProcXUngrabDevice(ClientPtr client) { REQUEST(xUngrabDeviceReq); - swaps(&stuff->length); REQUEST_SIZE_MATCH(xUngrabDeviceReq); swapl(&stuff->time); return (ProcXUngrabDevice(client)); diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c index 06c03ddef..1d6795fe8 100644 --- a/Xi/ungrdevb.c +++ b/Xi/ungrdevb.c @@ -77,7 +77,6 @@ int _X_COLD SProcXUngrabDeviceButton(ClientPtr client) { REQUEST(xUngrabDeviceButtonReq); - swaps(&stuff->length); REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c index e148e423a..eee36cbd1 100644 --- a/Xi/ungrdevk.c +++ b/Xi/ungrdevk.c @@ -79,7 +79,6 @@ int _X_COLD SProcXUngrabDeviceKey(ClientPtr client) { REQUEST(xUngrabDeviceKeyReq); - swaps(&stuff->length); REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); diff --git a/Xi/xiallowev.c b/Xi/xiallowev.c index 7c0231417..ab027216e 100644 --- a/Xi/xiallowev.c +++ b/Xi/xiallowev.c @@ -51,7 +51,6 @@ SProcXIAllowEvents(ClientPtr client) REQUEST(xXIAllowEventsReq); REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq); - swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->time); if (client->req_len > 3) { diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c index bd664ae8a..80c4b5981 100644 --- a/Xi/xibarriers.c +++ b/Xi/xibarriers.c @@ -842,7 +842,6 @@ SProcXIBarrierReleasePointer(ClientPtr client) REQUEST(xXIBarrierReleasePointerReq); int i; - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq); swapl(&stuff->num_barriers); diff --git a/Xi/xichangecursor.c b/Xi/xichangecursor.c index 066fe290b..a0ed7adf7 100644 --- a/Xi/xichangecursor.c +++ b/Xi/xichangecursor.c @@ -59,7 +59,6 @@ SProcXIChangeCursor(ClientPtr client) { REQUEST(xXIChangeCursorReq); REQUEST_SIZE_MATCH(xXIChangeCursorReq); - swaps(&stuff->length); swapl(&stuff->win); swapl(&stuff->cursor); swaps(&stuff->deviceid); diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c index cd4c1f5f0..709c8f12a 100644 --- a/Xi/xichangehierarchy.c +++ b/Xi/xichangehierarchy.c @@ -131,8 +131,6 @@ XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) int _X_COLD SProcXIChangeHierarchy(ClientPtr client) { - REQUEST(xXIChangeHierarchyReq); - swaps(&stuff->length); return (ProcXIChangeHierarchy(client)); } diff --git a/Xi/xigetclientpointer.c b/Xi/xigetclientpointer.c index 597cf38b8..95fb6f2d1 100644 --- a/Xi/xigetclientpointer.c +++ b/Xi/xigetclientpointer.c @@ -52,7 +52,6 @@ SProcXIGetClientPointer(ClientPtr client) REQUEST(xXIGetClientPointerReq); REQUEST_SIZE_MATCH(xXIGetClientPointerReq); - swaps(&stuff->length); swapl(&stuff->win); return ProcXIGetClientPointer(client); } diff --git a/Xi/xigrabdev.c b/Xi/xigrabdev.c index ca4f66ee4..0ea42db88 100644 --- a/Xi/xigrabdev.c +++ b/Xi/xigrabdev.c @@ -53,7 +53,6 @@ SProcXIGrabDevice(ClientPtr client) */ REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq); - swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->grab_window); swapl(&stuff->cursor); @@ -138,7 +137,6 @@ SProcXIUngrabDevice(ClientPtr client) REQUEST(xXIUngrabDeviceReq); REQUEST_SIZE_MATCH(xXIUngrabDeviceReq); - swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->time); diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c index afb24928a..2d6c51eb5 100644 --- a/Xi/xipassivegrab.c +++ b/Xi/xipassivegrab.c @@ -55,7 +55,6 @@ SProcXIPassiveGrabDevice(ClientPtr client) REQUEST(xXIPassiveGrabDeviceReq); REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq); - swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->grab_window); swapl(&stuff->cursor); @@ -280,7 +279,6 @@ SProcXIPassiveUngrabDevice(ClientPtr client) REQUEST(xXIPassiveUngrabDeviceReq); REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq); - swaps(&stuff->length); swapl(&stuff->grab_window); swaps(&stuff->deviceid); swapl(&stuff->detail); diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index 0a2376776..903f82a5e 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -1016,10 +1016,6 @@ ProcXGetDeviceProperty(ClientPtr client) int _X_COLD SProcXListDeviceProperties(ClientPtr client) { - REQUEST(xListDevicePropertiesReq); - REQUEST_SIZE_MATCH(xListDevicePropertiesReq); - - swaps(&stuff->length); return (ProcXListDeviceProperties(client)); } @@ -1029,7 +1025,6 @@ SProcXChangeDeviceProperty(ClientPtr client) REQUEST(xChangeDevicePropertyReq); REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq); - swaps(&stuff->length); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->nUnits); @@ -1042,7 +1037,6 @@ SProcXDeleteDeviceProperty(ClientPtr client) REQUEST(xDeleteDevicePropertyReq); REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq); - swaps(&stuff->length); swapl(&stuff->property); return (ProcXDeleteDeviceProperty(client)); } @@ -1053,7 +1047,6 @@ SProcXGetDeviceProperty(ClientPtr client) REQUEST(xGetDevicePropertyReq); REQUEST_SIZE_MATCH(xGetDevicePropertyReq); - swaps(&stuff->length); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->longOffset); @@ -1261,7 +1254,6 @@ SProcXIListProperties(ClientPtr client) REQUEST(xXIListPropertiesReq); REQUEST_SIZE_MATCH(xXIListPropertiesReq); - swaps(&stuff->length); swaps(&stuff->deviceid); return (ProcXIListProperties(client)); } @@ -1272,7 +1264,6 @@ SProcXIChangeProperty(ClientPtr client) REQUEST(xXIChangePropertyReq); REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq); - swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->property); swapl(&stuff->type); @@ -1286,7 +1277,6 @@ SProcXIDeleteProperty(ClientPtr client) REQUEST(xXIDeletePropertyReq); REQUEST_SIZE_MATCH(xXIDeletePropertyReq); - swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->property); return (ProcXIDeleteProperty(client)); @@ -1298,7 +1288,6 @@ SProcXIGetProperty(ClientPtr client) REQUEST(xXIGetPropertyReq); REQUEST_SIZE_MATCH(xXIGetPropertyReq); - swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->property); swapl(&stuff->type); diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c index cbc3c037e..af72e05f7 100644 --- a/Xi/xiquerydevice.c +++ b/Xi/xiquerydevice.c @@ -58,7 +58,6 @@ SProcXIQueryDevice(ClientPtr client) REQUEST(xXIQueryDeviceReq); REQUEST_SIZE_MATCH(xXIQueryDeviceReq); - swaps(&stuff->length); swaps(&stuff->deviceid); return ProcXIQueryDevice(client); diff --git a/Xi/xiquerypointer.c b/Xi/xiquerypointer.c index 5ca18484b..6c9d200ed 100644 --- a/Xi/xiquerypointer.c +++ b/Xi/xiquerypointer.c @@ -67,7 +67,6 @@ SProcXIQueryPointer(ClientPtr client) REQUEST(xXIQueryPointerReq); REQUEST_SIZE_MATCH(xXIQueryPointerReq); - swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->win); return (ProcXIQueryPointer(client)); diff --git a/Xi/xiqueryversion.c b/Xi/xiqueryversion.c index 8672409f7..e6c69dd51 100644 --- a/Xi/xiqueryversion.c +++ b/Xi/xiqueryversion.c @@ -133,7 +133,6 @@ int _X_COLD SProcXIQueryVersion(ClientPtr client) { REQUEST(xXIQueryVersionReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq); swaps(&stuff->major_version); swaps(&stuff->minor_version); diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c index 701a0f3b8..d341a12d5 100644 --- a/Xi/xiselectev.c +++ b/Xi/xiselectev.c @@ -120,7 +120,6 @@ SProcXISelectEvents(ClientPtr client) xXIEventMask *evmask; REQUEST(xXISelectEventsReq); - swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXISelectEventsReq); swapl(&stuff->win); swaps(&stuff->num_masks); @@ -331,7 +330,6 @@ int _X_COLD SProcXIGetSelectedEvents(ClientPtr client) { REQUEST(xXIGetSelectedEventsReq); - swaps(&stuff->length); REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq); swapl(&stuff->win); diff --git a/Xi/xisetclientpointer.c b/Xi/xisetclientpointer.c index 85ce3d75e..b6c3ddfd8 100644 --- a/Xi/xisetclientpointer.c +++ b/Xi/xisetclientpointer.c @@ -53,7 +53,6 @@ SProcXISetClientPointer(ClientPtr client) REQUEST(xXISetClientPointerReq); REQUEST_SIZE_MATCH(xXISetClientPointerReq); - swaps(&stuff->length); swapl(&stuff->win); swaps(&stuff->deviceid); return (ProcXISetClientPointer(client)); diff --git a/Xi/xisetdevfocus.c b/Xi/xisetdevfocus.c index 421511ee5..bf2103fdc 100644 --- a/Xi/xisetdevfocus.c +++ b/Xi/xisetdevfocus.c @@ -46,7 +46,6 @@ SProcXISetFocus(ClientPtr client) REQUEST(xXISetFocusReq); REQUEST_AT_LEAST_SIZE(xXISetFocusReq); - swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->focus); swapl(&stuff->time); @@ -60,7 +59,6 @@ SProcXIGetFocus(ClientPtr client) REQUEST(xXIGetFocusReq); REQUEST_AT_LEAST_SIZE(xXIGetFocusReq); - swaps(&stuff->length); swaps(&stuff->deviceid); return ProcXIGetFocus(client); diff --git a/Xi/xiwarppointer.c b/Xi/xiwarppointer.c index 5f32b18de..f4e08abdf 100644 --- a/Xi/xiwarppointer.c +++ b/Xi/xiwarppointer.c @@ -61,7 +61,6 @@ SProcXIWarpPointer(ClientPtr client) REQUEST(xXIWarpPointerReq); REQUEST_SIZE_MATCH(xXIWarpPointerReq); - swaps(&stuff->length); swapl(&stuff->src_win); swapl(&stuff->dst_win); swapl(&stuff->src_x); diff --git a/test/xi2/protocol-xigetselectedevents.c b/test/xi2/protocol-xigetselectedevents.c index 33cd899f4..b13077955 100644 --- a/test/xi2/protocol-xigetselectedevents.c +++ b/test/xi2/protocol-xigetselectedevents.c @@ -139,8 +139,18 @@ request_XIGetSelectedEvents(xXIGetSelectedEventsReq * req, int error) wrapped_WriteToClient = reply_XIGetSelectedEvents; client.swapped = TRUE; + + /* MUST NOT swap req->length here ! + + The handler proc's don't use that field anymore, thus also SProc's + wont swap it. But this test program uses that field to initialize + client->req_len (see above). We previously had to swap it here, so + that SProcXIPassiveGrabDevice() will swap it back. Since that's gone + now, still swapping itself would break if this function is called + again and writing back a errornously swapped value + */ + swapl(&req->win); - swaps(&req->length); rc = SProcXIGetSelectedEvents(&client); assert(rc == error); } diff --git a/test/xi2/protocol-xipassivegrabdevice.c b/test/xi2/protocol-xipassivegrabdevice.c index 2146462b0..18413a853 100644 --- a/test/xi2/protocol-xipassivegrabdevice.c +++ b/test/xi2/protocol-xipassivegrabdevice.c @@ -144,7 +144,17 @@ request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq * req, assert(client_request.errorValue == errval); client_request.swapped = TRUE; - swaps(&req->length); + + /* MUST NOT swap req->length here ! + + The handler proc's don't use that field anymore, thus also SProc's + wont swap it. But this test program uses that field to initialize + client->req_len (see above). We previously had to swap it here, so + that SProcXIPassiveGrabDevice() will swap it back. Since that's gone + now, still swapping itself would break if this function is called + again and writing back a errornously swapped value + */ + swapl(&req->time); swapl(&req->grab_window); swapl(&req->cursor); diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c index 612cb6bdb..237c8f00b 100644 --- a/test/xi2/protocol-xiselectevents.c +++ b/test/xi2/protocol-xiselectevents.c @@ -107,8 +107,17 @@ request_XISelectEvent(xXISelectEventsReq * req, int error) mask = next; } + /* MUST NOT swap req->length here ! + + The handler proc's don't use that field anymore, thus also SProc's + wont swap it. But this test program uses that field to initialize + client->req_len (see above). We previously had to swap it here, so + that SProcXIPassiveGrabDevice() will swap it back. Since that's gone + now, still swapping itself would break if this function is called + again and writing back a errornously swapped value + */ + swapl(&req->win); - swaps(&req->length); swaps(&req->num_masks); rc = SProcXISelectEvents(&client); assert(rc == error); diff --git a/test/xi2/protocol-xisetclientpointer.c b/test/xi2/protocol-xisetclientpointer.c index d47baea7d..674bc9b18 100644 --- a/test/xi2/protocol-xisetclientpointer.c +++ b/test/xi2/protocol-xisetclientpointer.c @@ -66,8 +66,18 @@ request_XISetClientPointer(xXISetClientPointerReq * req, int error) assert(client_request.errorValue == req->deviceid); client_request.swapped = TRUE; + + /* MUST NOT swap req->length here ! + + The handler proc's don't use that field anymore, thus also SProc's + wont swap it. But this test program uses that field to initialize + client->req_len (see above). We previously had to swap it here, so + that SProcXIPassiveGrabDevice() will swap it back. Since that's gone + now, still swapping itself would break if this function is called + again and writing back a errornously swapped value + */ + swapl(&req->win); - swaps(&req->length); swaps(&req->deviceid); rc = SProcXISetClientPointer(&client_request); assert(rc == error);