summaryrefslogtreecommitdiff
path: root/src/XTest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/XTest.c')
-rw-r--r--src/XTest.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/XTest.c b/src/XTest.c
index e534ee4..2e53700 100644
--- a/src/XTest.c
+++ b/src/XTest.c
@@ -99,10 +99,11 @@ XTestQueryExtension (Display *dpy,
int *major_return, int *minor_return)
{
XExtDisplayInfo *info = find_display (dpy);
- register xXTestGetVersionReq *req;
xXTestGetVersionReply rep;
if (XextHasExtension(info)) {
+ xXTestGetVersionReq *req;
+
LockDisplay(dpy);
GetReq(XTestGetVersion, req);
req->reqType = info->codes->major_opcode;
@@ -259,7 +260,6 @@ send_axes(
int n_axes)
{
deviceValuator ev;
- int n;
req->deviceid |= MORE_EVENTS;
req->length += ((n_axes + 5) / 6) * (SIZEOF(xEvent) >> 2);
@@ -267,7 +267,7 @@ send_axes(
ev.deviceid = dev->device_id;
ev.first_valuator = first_axis;
while (n_axes > 0) {
- n = n_axes > 6 ? 6 : n_axes;
+ int n = n_axes > 6 ? 6 : n_axes;
ev.num_valuators = n;
switch (n) {
case 6:
@@ -433,11 +433,10 @@ Status
XTestDiscard(Display *dpy)
{
Bool something;
- register char *ptr;
LockDisplay(dpy);
if ((something = (dpy->bufptr != dpy->buffer))) {
- for (ptr = dpy->buffer;
+ for (char *ptr = dpy->buffer;
ptr < dpy->bufptr;
ptr += (((xReq *)ptr)->length << 2))
dpy->request--;