Xi: rename two variables from ptr to dev.

They were named ptr when everything was in one function to save one more
variable. Now that the stuff is split out, "dev" makes more sense.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
This commit is contained in:
Peter Hutterer 2010-11-05 11:49:12 +10:00
parent 9b89b91c68
commit 5a455e0c80

View File

@ -325,14 +325,14 @@ unwind:
static int static int
detach_slave(ClientPtr client, xXIDetachSlaveInfo *c, int flags[MAXDEVICES]) detach_slave(ClientPtr client, xXIDetachSlaveInfo *c, int flags[MAXDEVICES])
{ {
DeviceIntPtr ptr; DeviceIntPtr dev;
int rc; int rc;
rc = dixLookupDevice(&ptr, c->deviceid, client, DixManageAccess); rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess);
if (rc != Success) if (rc != Success)
goto unwind; goto unwind;
if (IsMaster(ptr)) if (IsMaster(dev))
{ {
client->errorValue = c->deviceid; client->errorValue = c->deviceid;
rc = BadDevice; rc = BadDevice;
@ -340,15 +340,15 @@ detach_slave(ClientPtr client, xXIDetachSlaveInfo *c, int flags[MAXDEVICES])
} }
/* Don't allow changes to XTest Devices, these are fixed */ /* Don't allow changes to XTest Devices, these are fixed */
if (IsXTestDevice(ptr, NULL)) if (IsXTestDevice(dev, NULL))
{ {
client->errorValue = c->deviceid; client->errorValue = c->deviceid;
rc = BadDevice; rc = BadDevice;
goto unwind; goto unwind;
} }
AttachDevice(client, ptr, NULL); AttachDevice(client, dev, NULL);
flags[ptr->id] |= XISlaveDetached; flags[dev->id] |= XISlaveDetached;
unwind: unwind:
return rc; return rc;
@ -358,15 +358,15 @@ static int
attach_slave(ClientPtr client, xXIAttachSlaveInfo *c, attach_slave(ClientPtr client, xXIAttachSlaveInfo *c,
int flags[MAXDEVICES]) int flags[MAXDEVICES])
{ {
DeviceIntPtr ptr; DeviceIntPtr dev;
DeviceIntPtr newmaster; DeviceIntPtr newmaster;
int rc; int rc;
rc = dixLookupDevice(&ptr, c->deviceid, client, DixManageAccess); rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess);
if (rc != Success) if (rc != Success)
goto unwind; goto unwind;
if (IsMaster(ptr)) if (IsMaster(dev))
{ {
client->errorValue = c->deviceid; client->errorValue = c->deviceid;
rc = BadDevice; rc = BadDevice;
@ -374,7 +374,7 @@ attach_slave(ClientPtr client, xXIAttachSlaveInfo *c,
} }
/* Don't allow changes to XTest Devices, these are fixed */ /* Don't allow changes to XTest Devices, these are fixed */
if (IsXTestDevice(ptr, NULL)) if (IsXTestDevice(dev, NULL))
{ {
client->errorValue = c->deviceid; client->errorValue = c->deviceid;
rc = BadDevice; rc = BadDevice;
@ -391,15 +391,15 @@ attach_slave(ClientPtr client, xXIAttachSlaveInfo *c,
goto unwind; goto unwind;
} }
if (!((IsPointerDevice(newmaster) && IsPointerDevice(ptr)) || if (!((IsPointerDevice(newmaster) && IsPointerDevice(dev)) ||
(IsKeyboardDevice(newmaster) && IsKeyboardDevice(ptr)))) (IsKeyboardDevice(newmaster) && IsKeyboardDevice(dev))))
{ {
rc = BadDevice; rc = BadDevice;
goto unwind; goto unwind;
} }
AttachDevice(client, ptr, newmaster); AttachDevice(client, dev, newmaster);
flags[ptr->id] |= XISlaveAttached; flags[dev->id] |= XISlaveAttached;
unwind: unwind:
return rc; return rc;