From 6e244b109861d6f602066cac8b766a55a5016c63 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 20 May 2010 12:38:19 +1000 Subject: 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 --- src/evdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3