aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
authorRami Ylimäki <rami.ylimaki@vincit.fi>2011-03-08 11:23:47 +0200
committerPeter Hutterer <peter.hutterer@who-t.net>2011-03-09 15:28:10 +1000
commit41111ce1efc6181b8da042c5b01f01cdf92315be (patch)
treea80c572160cbf63974bae47bc911ac12473c5522 /src/evdev.c
parentRelease leaked device identifier on input device disconnect. (diff)
downloadxf86-input-evdev-41111ce1efc6181b8da042c5b01f01cdf92315be.tar.gz
xf86-input-evdev-41111ce1efc6181b8da042c5b01f01cdf92315be.tar.bz2
xf86-input-evdev-41111ce1efc6181b8da042c5b01f01cdf92315be.zip
Remove constness of device filename to avoid warning when freed.
A warning from free() can be avoided by casting the constness away from its argument pointer or by not declaring the pointer as const in the first place. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/evdev.c b/src/evdev.c
index b62caa2..ab46277 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1788,7 +1788,7 @@ static int
EvdevOpenDevice(InputInfoPtr pInfo)
{
EvdevPtr pEvdev = pInfo->private;
- char *device = (char*)pEvdev->device;
+ char *device = pEvdev->device;
if (!device)
{
@@ -1835,7 +1835,7 @@ EvdevUnInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
/* Release strings allocated in EvdevAddKeyClass. */
XkbFreeRMLVOSet(&pEvdev->rmlvo, FALSE);
/* Release string allocated in EvdevOpenDevice. */
- free((void *)pEvdev->device); /* (const char *) */
+ free(pEvdev->device);
pEvdev->device = NULL;
}
xf86DeleteInput(pInfo, flags);