summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-01-30 08:50:06 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-02-04 11:27:48 +1000
commitce3df579e3f24a169189b288230959527e059080 (patch)
treed3c689b384ded50e470e96dd349b1d117e23e9d3 /dix
parent2fc38d1e299587d25ca8225051e0ea9403164b15 (diff)
input: un-constify InputAttributes
Introduced in fecc7eb1cf66db64728ee2d68cd9443df7e70879 and reverts most of that but it's helpfully mixed with other stuff. InputAttributes are not const, they're strdup'd everywhere but the test code and freed properly. Revert the const char changes and fix the test up instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'dix')
-rw-r--r--dix/inpututils.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/dix/inpututils.c b/dix/inpututils.c
index 3e1d75fec..a10a7c761 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -351,7 +351,7 @@ DuplicateInputAttributes(InputAttributes * attrs)
{
InputAttributes *new_attr;
int ntags = 0;
- const char **tags, **new_tags;
+ char **tags, **new_tags;
if (!attrs)
return NULL;
@@ -403,20 +403,20 @@ DuplicateInputAttributes(InputAttributes * attrs)
void
FreeInputAttributes(InputAttributes * attrs)
{
- const char **tags;
+ char **tags;
if (!attrs)
return;
- free((void *) attrs->product);
- free((void *) attrs->vendor);
- free((void *) attrs->device);
- free((void *) attrs->pnp_id);
- free((void *) attrs->usb_id);
+ free(attrs->product);
+ free(attrs->vendor);
+ free(attrs->device);
+ free(attrs->pnp_id);
+ free(attrs->usb_id);
if ((tags = attrs->tags))
while (*tags)
- free((void *) *tags++);
+ free(*tags++);
free(attrs->tags);
free(attrs);