diff options
author | Daniel Stone <daniel@fooishbar.org> | 2012-03-15 15:18:29 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-03-21 14:02:30 -0700 |
commit | ab3a815a75ab5695753fa37a98b0ea5293d4cb91 (patch) | |
tree | a8fd1cf44108245b42ba409944be962ac060098d /Xi | |
parent | 58b1f739d73b03ff7952ca986ed8746a7307fffe (diff) |
Indentation: Change '& stuff' to '&stuff'
If the typedef wasn't perfect, indent would get confused and change:
foo = (SomePointlessTypedef *) &stuff[1];
to:
foo = (SomePointlessTypedef *) & stuff[1];
Fix this up with a really naïve sed script, plus some hand-editing to
change some false positives in XKB back.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/chgdctl.c | 6 | ||||
-rw-r--r-- | Xi/chgfctl.c | 24 | ||||
-rw-r--r-- | Xi/chgkmap.c | 2 | ||||
-rw-r--r-- | Xi/chgprop.c | 2 | ||||
-rw-r--r-- | Xi/grabdev.c | 2 | ||||
-rw-r--r-- | Xi/selectev.c | 4 | ||||
-rw-r--r-- | Xi/xichangehierarchy.c | 2 | ||||
-rw-r--r-- | Xi/xipassivegrab.c | 8 | ||||
-rw-r--r-- | Xi/xiselectev.c | 6 |
9 files changed, 28 insertions, 28 deletions
diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index e9975f30b..ff5d69aef 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -80,7 +80,7 @@ SProcXChangeDeviceControl(ClientPtr client) swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); swaps(&stuff->control); - ctl = (xDeviceCtl *) & stuff[1]; + ctl = (xDeviceCtl *) &stuff[1]; swaps(&ctl->control); swaps(&ctl->length); switch (stuff->control) { @@ -130,7 +130,7 @@ ProcXChangeDeviceControl(ClientPtr client) switch (stuff->control) { case DEVICE_RESOLUTION: - r = (xDeviceResolutionCtl *) & stuff[1]; + r = (xDeviceResolutionCtl *) &stuff[1]; if ((len < bytes_to_int32(sizeof(xDeviceResolutionCtl))) || (len != bytes_to_int32(sizeof(xDeviceResolutionCtl)) + r->num_valuators)) { @@ -183,7 +183,7 @@ ProcXChangeDeviceControl(ClientPtr client) ret = BadMatch; break; case DEVICE_ENABLE: - e = (xDeviceEnableCtl *) & stuff[1]; + e = (xDeviceEnableCtl *) &stuff[1]; status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e); diff --git a/Xi/chgfctl.c b/Xi/chgfctl.c index db47cfc10..6dcf60c66 100644 --- a/Xi/chgfctl.c +++ b/Xi/chgfctl.c @@ -449,22 +449,22 @@ ProcXChangeFeedbackControl(ClientPtr client) return BadLength; for (k = dev->kbdfeed; k; k = k->next) - if (k->ctrl.id == ((xKbdFeedbackCtl *) & stuff[1])->id) + if (k->ctrl.id == ((xKbdFeedbackCtl *) &stuff[1])->id) return ChangeKbdFeedback(client, dev, stuff->mask, k, - (xKbdFeedbackCtl *) & stuff[1]); + (xKbdFeedbackCtl *) &stuff[1]); break; case PtrFeedbackClass: if (len != bytes_to_int32(sizeof(xPtrFeedbackCtl))) return BadLength; for (p = dev->ptrfeed; p; p = p->next) - if (p->ctrl.id == ((xPtrFeedbackCtl *) & stuff[1])->id) + if (p->ctrl.id == ((xPtrFeedbackCtl *) &stuff[1])->id) return ChangePtrFeedback(client, dev, stuff->mask, p, - (xPtrFeedbackCtl *) & stuff[1]); + (xPtrFeedbackCtl *) &stuff[1]); break; case StringFeedbackClass: { - xStringFeedbackCtl *f = ((xStringFeedbackCtl *) & stuff[1]); + xStringFeedbackCtl *f = ((xStringFeedbackCtl *) &stuff[1]); if (client->swapped) { swaps(&f->num_keysyms); @@ -474,9 +474,9 @@ ProcXChangeFeedbackControl(ClientPtr client) return BadLength; for (s = dev->stringfeed; s; s = s->next) - if (s->ctrl.id == ((xStringFeedbackCtl *) & stuff[1])->id) + if (s->ctrl.id == ((xStringFeedbackCtl *) &stuff[1])->id) return ChangeStringFeedback(client, dev, stuff->mask, s, - (xStringFeedbackCtl *) & stuff[1]); + (xStringFeedbackCtl *) &stuff[1]); break; } case IntegerFeedbackClass: @@ -484,7 +484,7 @@ ProcXChangeFeedbackControl(ClientPtr client) return BadLength; for (i = dev->intfeed; i; i = i->next) - if (i->ctrl.id == ((xIntegerFeedbackCtl *) & stuff[1])->id) + if (i->ctrl.id == ((xIntegerFeedbackCtl *) &stuff[1])->id) return ChangeIntegerFeedback(client, dev, stuff->mask, i, (xIntegerFeedbackCtl *) & stuff[1]); @@ -494,18 +494,18 @@ ProcXChangeFeedbackControl(ClientPtr client) return BadLength; for (l = dev->leds; l; l = l->next) - if (l->ctrl.id == ((xLedFeedbackCtl *) & stuff[1])->id) + if (l->ctrl.id == ((xLedFeedbackCtl *) &stuff[1])->id) return ChangeLedFeedback(client, dev, stuff->mask, l, - (xLedFeedbackCtl *) & stuff[1]); + (xLedFeedbackCtl *) &stuff[1]); break; case BellFeedbackClass: if (len != bytes_to_int32(sizeof(xBellFeedbackCtl))) return BadLength; for (b = dev->bell; b; b = b->next) - if (b->ctrl.id == ((xBellFeedbackCtl *) & stuff[1])->id) + if (b->ctrl.id == ((xBellFeedbackCtl *) &stuff[1])->id) return ChangeBellFeedback(client, dev, stuff->mask, b, - (xBellFeedbackCtl *) & stuff[1]); + (xBellFeedbackCtl *) &stuff[1]); break; default: break; diff --git a/Xi/chgkmap.c b/Xi/chgkmap.c index daa7616fa..49660f944 100644 --- a/Xi/chgkmap.c +++ b/Xi/chgkmap.c @@ -110,7 +110,7 @@ ProcXChangeDeviceKeyMapping(ClientPtr client) ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify, stuff->firstKeyCode, stuff->keyCodes, - stuff->keySymsPerKeyCode, (KeySym *) & stuff[1]); + stuff->keySymsPerKeyCode, (KeySym *) &stuff[1]); return ret; } diff --git a/Xi/chgprop.c b/Xi/chgprop.c index 34979875c..84fb51dcb 100644 --- a/Xi/chgprop.c +++ b/Xi/chgprop.c @@ -116,7 +116,7 @@ ProcXChangeDeviceDontPropagateList(ClientPtr client) return BadMode; } - if ((rc = CreateMaskFromList(client, (XEventClass *) & stuff[1], + if ((rc = CreateMaskFromList(client, (XEventClass *) &stuff[1], stuff->count, tmp, NULL, X_ChangeDeviceDontPropagateList)) != Success) return rc; diff --git a/Xi/grabdev.c b/Xi/grabdev.c index c505de38d..c904a9707 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -122,7 +122,7 @@ ProcXGrabDevice(ClientPtr client) if (rc != Success) return rc; - if ((rc = CreateMaskFromList(client, (XEventClass *) & stuff[1], + if ((rc = CreateMaskFromList(client, (XEventClass *) &stuff[1], stuff->event_count, tmp, dev, X_GrabDevice)) != Success) return rc; diff --git a/Xi/selectev.c b/Xi/selectev.c index 2b93fbf47..284bd29e5 100644 --- a/Xi/selectev.c +++ b/Xi/selectev.c @@ -158,11 +158,11 @@ ProcXSelectExtensionEvent(ClientPtr client) if (ret != Success) return ret; - if (HandleDevicePresenceMask(client, pWin, (XEventClass *) & stuff[1], + if (HandleDevicePresenceMask(client, pWin, (XEventClass *) &stuff[1], &stuff->count) != Success) return BadAlloc; - if ((ret = CreateMaskFromList(client, (XEventClass *) & stuff[1], + if ((ret = CreateMaskFromList(client, (XEventClass *) &stuff[1], stuff->count, tmp, NULL, X_SelectExtensionEvent)) != Success) return ret; diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c index 637526aec..756aaac06 100644 --- a/Xi/xichangehierarchy.c +++ b/Xi/xichangehierarchy.c @@ -417,7 +417,7 @@ ProcXIChangeHierarchy(ClientPtr client) if (!stuff->num_changes) return rc; - any = (xXIAnyHierarchyChangeInfo *) & stuff[1]; + any = (xXIAnyHierarchyChangeInfo *) &stuff[1]; while (stuff->num_changes--) { SWAPIF(swaps(&any->type)); SWAPIF(swaps(&any->length)); diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c index f8ff8d803..8a1c59968 100644 --- a/Xi/xipassivegrab.c +++ b/Xi/xipassivegrab.c @@ -63,7 +63,7 @@ SProcXIPassiveGrabDevice(ClientPtr client) swaps(&stuff->mask_len); swaps(&stuff->num_modifiers); - mods = (xXIModifierInfo *) & stuff[1]; + mods = (xXIModifierInfo *) &stuff[1]; for (i = 0; i < stuff->num_modifiers; i++, mods++) { swapl(&mods->base_mods); @@ -177,7 +177,7 @@ ProcXIPassiveGrabDevice(ClientPtr client) if (ret != Success) goto out; - modifiers = (uint32_t *) & stuff[1] + stuff->mask_len; + modifiers = (uint32_t *) &stuff[1] + stuff->mask_len; modifiers_failed = calloc(stuff->num_modifiers, sizeof(xXIGrabModifierInfo)); if (!modifiers_failed) { @@ -257,7 +257,7 @@ SProcXIPassiveUngrabDevice(ClientPtr client) swapl(&stuff->detail); swaps(&stuff->num_modifiers); - modifiers = (uint32_t *) & stuff[1]; + modifiers = (uint32_t *) &stuff[1]; for (i = 0; i < stuff->num_modifiers; i++, modifiers++) swapl(modifiers); @@ -334,7 +334,7 @@ ProcXIPassiveUngrabDevice(ClientPtr client) tempGrab->detail.exact = stuff->detail; tempGrab->detail.pMask = NULL; - modifiers = (uint32_t *) & stuff[1]; + modifiers = (uint32_t *) &stuff[1]; for (i = 0; i < stuff->num_modifiers; i++, modifiers++) { tempGrab->modifiersDetail.exact = *modifiers; diff --git a/Xi/xiselectev.c b/Xi/xiselectev.c index 3405227f0..43a67c833 100644 --- a/Xi/xiselectev.c +++ b/Xi/xiselectev.c @@ -71,7 +71,7 @@ SProcXISelectEvents(ClientPtr client) swapl(&stuff->win); swaps(&stuff->num_masks); - evmask = (xXIEventMask *) & stuff[1]; + evmask = (xXIEventMask *) &stuff[1]; for (i = 0; i < stuff->num_masks; i++) { swaps(&evmask->deviceid); swaps(&evmask->mask_len); @@ -106,7 +106,7 @@ ProcXISelectEvents(ClientPtr client) len = sz_xXISelectEventsReq; /* check request validity */ - evmask = (xXIEventMask *) & stuff[1]; + evmask = (xXIEventMask *) &stuff[1]; num_masks = stuff->num_masks; while (num_masks--) { len += sizeof(xXIEventMask) + evmask->mask_len * 4; @@ -205,7 +205,7 @@ ProcXISelectEvents(ClientPtr client) return BadLength; /* Set masks on window */ - evmask = (xXIEventMask *) & stuff[1]; + evmask = (xXIEventMask *) &stuff[1]; num_masks = stuff->num_masks; while (num_masks--) { if (evmask->deviceid == XIAllDevices || |