summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2010-05-20 12:38:19 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2010-05-28 09:24:28 +1000
commit6e244b109861d6f602066cac8b766a55a5016c63 (patch)
tree23ab789c62205a6324d09f0421ebd57fc410881c
parente7c301563a4b1718d2fc0066c1b3125404e3060f (diff)
Move mode declaration, it's not const either.
What we're getting back from xf86SetStrOption is a strdup'd string, not const, especially given that we free it a few lines down. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 624f431..0768bca 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1139,7 +1139,6 @@ EvdevAddAbsClass(DeviceIntPtr device)
EvdevPtr pEvdev;
int num_axes, axis, i = 0;
Atom *atoms;
- const char *mode;
pInfo = device->public.devicePrivate;
pEvdev = pInfo->private;
@@ -1227,6 +1226,7 @@ EvdevAddAbsClass(DeviceIntPtr device)
if (xf86FindOption(pInfo->options, "Mode"))
{
+ char *mode;
mode = xf86SetStrOption(pInfo->options, "Mode", NULL);
if (!strcasecmp("absolute", mode))
pEvdev->flags &= ~EVDEV_RELATIVE_MODE;