[PATCH evdev 2/6] strtol doesn't need a empty string, NULL is good enough.

Peter Hutterer peter.hutterer at who-t.net
Wed Jun 6 18:36:56 PDT 2012


Fixes:
evdev.c: In function 'EvdevInitButtonMapping':
evdev.c:1659:25: warning: initialization discards 'const' qualifier from
pointer target type [enabled by default]

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/evdev.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/evdev.c b/src/evdev.c
index f0ddb3a..1a1180b 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1657,7 +1657,7 @@ EvdevInitButtonMapping(InputInfoPtr pInfo)
     /* Check for user-defined button mapping */
     if ((mapping = xf86CheckStrOption(pInfo->options, "ButtonMapping", NULL)))
     {
-        char    *map, *s = " ";
+        char    *map, *s = NULL;
         int     btn = 0;
 
         xf86IDrvMsg(pInfo, X_CONFIG, "ButtonMapping '%s'\n", mapping);
-- 
1.7.10.2



More information about the xorg-devel mailing list