summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2012-11-05 23:50:58 -0600
committerYaakov Selkowitz <yselkowitz@users.sourceforge.net>2012-12-05 18:09:48 -0600
commitea1d76d1b68c7cbcedcaa1f967c5027e0cc1c7a2 (patch)
tree1884a50874290647041b4d045cfb9eb1e4d8aee7 /test
parentb51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3 (diff)
Fix formatting of address operators
The formatter confused address operators preceded by casts with bitwise-and expressions, placing spaces on either side of both. That syntax isn't used by ordinary address operators, however, so fix them for consistency. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'test')
-rw-r--r--test/input.c2
-rw-r--r--test/xi2/protocol-eventconvert.c2
-rw-r--r--test/xi2/protocol-xiquerydevice.c2
-rw-r--r--test/xi2/protocol-xiselectevents.c12
4 files changed, 9 insertions, 9 deletions
diff --git a/test/input.c b/test/input.c
index 191c81789..be988a4a3 100644
--- a/test/input.c
+++ b/test/input.c
@@ -406,7 +406,7 @@ _dix_test_xi_convert(DeviceEvent *ev, int expected_rc, int expected_count)
assert(kbp->same_screen == FALSE);
while (--count > 0) {
- deviceValuator *v = (deviceValuator *) & xi[count];
+ deviceValuator *v = (deviceValuator *) &xi[count];
assert(v->type == DeviceValuator);
assert(v->num_valuators <= 6);
diff --git a/test/xi2/protocol-eventconvert.c b/test/xi2/protocol-eventconvert.c
index bb3177cc1..5db691c54 100644
--- a/test/xi2/protocol-eventconvert.c
+++ b/test/xi2/protocol-eventconvert.c
@@ -694,7 +694,7 @@ test_values_XIDeviceChangedEvent(DeviceChangedEvent *in,
assert(k->num_keycodes == in->keys.max_keycode -
in->keys.min_keycode + 1);
- kc = (uint32_t *) & k[1];
+ kc = (uint32_t *) &k[1];
for (j = 0; j < k->num_keycodes; j++) {
if (swap) {
swapl(&kc[j]);
diff --git a/test/xi2/protocol-xiquerydevice.c b/test/xi2/protocol-xiquerydevice.c
index 9d13bbb6f..c066daa35 100644
--- a/test/xi2/protocol-xiquerydevice.c
+++ b/test/xi2/protocol-xiquerydevice.c
@@ -171,7 +171,7 @@ reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *closure)
(xkb->max_key_code - xkb->min_key_code + 1));
assert(any->length == (2 + ki->num_keycodes));
- kc = (uint32_t *) & ki[1];
+ kc = (uint32_t *) &ki[1];
for (k = 0; k < ki->num_keycodes; k++, kc++) {
if (client->swapped)
swapl(kc);
diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c
index 8f6b947d4..183746f98 100644
--- a/test/xi2/protocol-xiselectevents.c
+++ b/test/xi2/protocol-xiselectevents.c
@@ -98,7 +98,7 @@ request_XISelectEvent(xXISelectEventsReq * req, int error)
xXIEventMask *mask, *next;
req->length = (sz_xXISelectEventsReq / 4);
- mask = (xXIEventMask *) & req[1];
+ mask = (xXIEventMask *) &req[1];
for (i = 0; i < req->num_masks; i++) {
req->length += sizeof(xXIEventMask) / 4 + mask->mask_len;
mask = (xXIEventMask *) ((char *) &mask[1] + mask->mask_len * 4);
@@ -111,7 +111,7 @@ request_XISelectEvent(xXISelectEventsReq * req, int error)
client.swapped = TRUE;
- mask = (xXIEventMask *) & req[1];
+ mask = (xXIEventMask *) &req[1];
for (i = 0; i < req->num_masks; i++) {
next = (xXIEventMask *) ((char *) &mask[1] + mask->mask_len * 4);
swaps(&mask->deviceid);
@@ -156,7 +156,7 @@ request_XISelectEvents_masks(xXISelectEventsReq * req)
int nmasks = (XI2LASTEVENT + 7) / 8;
unsigned char *bits;
- mask = (xXIEventMask *) & req[1];
+ mask = (xXIEventMask *) &req[1];
req->win = ROOT_WINDOW_ID;
/* if a clients submits more than 100 masks, consider it insane and untested */
@@ -312,7 +312,7 @@ test_XISelectEvents(void)
req->num_masks = 1;
printf("Triggering bogus mask length error\n");
- mask = (xXIEventMask *) & req[1];
+ mask = (xXIEventMask *) &req[1];
mask->deviceid = 0;
mask->mask_len = 0xFFFF;
request_XISelectEvent(req, BadLength);
@@ -320,7 +320,7 @@ test_XISelectEvents(void)
/* testing various device ids */
printf("Testing existing device ids.\n");
for (i = 0; i < 6; i++) {
- mask = (xXIEventMask *) & req[1];
+ mask = (xXIEventMask *) &req[1];
mask->deviceid = i;
mask->mask_len = 1;
req->win = ROOT_WINDOW_ID;
@@ -332,7 +332,7 @@ test_XISelectEvents(void)
for (i = 6; i <= 0xFFFF; i++) {
req->win = ROOT_WINDOW_ID;
req->num_masks = 1;
- mask = (xXIEventMask *) & req[1];
+ mask = (xXIEventMask *) &req[1];
mask->deviceid = i;
mask->mask_len = 1;
request_XISelectEvent(req, BadDevice);