Change b to button and oldButton to oldOption to avoid confusion.
Signed-off-by: Ping Cheng <[email protected]>
---
src/wcmValidateDevice.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index 438cf38..c46043f 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -385,8 +385,8 @@ int wcmParseOptions(LocalDevicePtr local, int hotplugged)
{
WacomDevicePtr priv = (WacomDevicePtr)local->private;
WacomCommonPtr common = priv->common;
- char *s, b[12];
- int i, oldButton;
+ char *s, button[12];
+ int i, oldOption;
WacomToolPtr tool = NULL;
WacomToolAreaPtr area = NULL;
@@ -570,12 +570,12 @@ int wcmParseOptions(LocalDevicePtr local, int hotplugged)
if (TabletHasFeature(common, WCM_TPC))
common->wcmTPCButtonDefault = 1;
- oldButton = xf86SetBoolOption(local->options, "TPCButton",
+ oldOption = xf86SetBoolOption(local->options, "TPCButton",
common->wcmTPCButtonDefault);
if (hotplugged || IsStylus(priv))
- common->wcmTPCButton = oldButton;
- else if (oldButton != common->wcmTPCButton)
+ common->wcmTPCButton = oldOption;
+ else if (oldOption != common->wcmTPCButton)
xf86Msg(X_WARNING, "%s: TPCButton option can only be set "
"by stylus.\n", local->name);
@@ -586,21 +586,21 @@ int wcmParseOptions(LocalDevicePtr local, int hotplugged)
* except when touch is supported */
common->wcmTouchDefault = 1;
- oldButton = xf86SetBoolOption(local->options, "Touch",
+ oldOption = xf86SetBoolOption(local->options, "Touch",
common->wcmTouchDefault);
if (hotplugged || IsTouch(priv))
- common->wcmTouch = oldButton;
- else if (oldButton != common->wcmTouch)
+ common->wcmTouch = oldOption;
+ else if (oldOption != common->wcmTouch)
xf86Msg(X_WARNING, "%s: Touch option can only be set "
"by a touch tool.\n", local->name);
- oldButton = xf86SetBoolOption(local->options, "Capacity",
+ oldOption = xf86SetBoolOption(local->options, "Capacity",
common->wcmCapacityDefault);
if (hotplugged || IsTouch(priv))
- common->wcmCapacity = oldButton;
- else if (oldButton != common->wcmCapacity)
+ common->wcmCapacity = oldOption;
+ else if (oldOption != common->wcmCapacity)
xf86Msg(X_WARNING, "%s: Touch Capacity option can only
be"
"set by a touch tool.\n", local->name);
}
@@ -612,12 +612,12 @@ int wcmParseOptions(LocalDevicePtr local, int hotplugged)
* except when multi-touch is supported */
common->wcmGestureDefault = 1;
- oldButton = xf86SetBoolOption(local->options, "Gesture",
+ oldOption = xf86SetBoolOption(local->options, "Gesture",
common->wcmGestureDefault);
if (hotplugged || IsTouch(priv))
- common->wcmGesture = oldButton;
- else if (oldButton != common->wcmGesture)
+ common->wcmGesture = oldOption;
+ else if (oldOption != common->wcmGesture)
xf86Msg(X_WARNING, "%s: Touch gesture option can only "
"be set by a touch tool.\n", local->name);
}
@@ -628,8 +628,8 @@ int wcmParseOptions(LocalDevicePtr local, int hotplugged)
for (i=0; i<WCM_MAX_BUTTONS; i++)
{
- sprintf(b, "Button%d", i+1);
- priv->button[i] = xf86SetIntOption(local->options, b,
priv->button[i]);
+ sprintf(button, "Button%d", i+1);
+ priv->button[i] = xf86SetIntOption(local->options, button,
priv->button[i]);
}
if (common->wcmForceDevice == DEVICE_ISDV4)
--
1.6.6.1
------------------------------------------------------------------------------
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel