summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2014-02-05 14:24:54 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2014-02-05 14:24:54 +1000
commit46ae9d67e4118fa79bef0f9119d20559dfd6b6c0 (patch)
treef0faa0b77e19b56fdf5444b72ee3e23ea974801f /hw
parent93bf9544712a39f10557533993d8826b2b67fc9a (diff)
xfree86: un-constify inp_driver/inp_identifier
The only place this isn't allocated is during Xorg -configure where we just statically assing "mouse"/"kbd" and the identifiers for it. Everywhere else it's strdup'd and then free'd already. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/common/xf86Configure.c8
-rw-r--r--hw/xfree86/parser/xf86Parser.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c
index 30dc5505c..5fc13997d 100644
--- a/hw/xfree86/common/xf86Configure.c
+++ b/hw/xfree86/common/xf86Configure.c
@@ -159,8 +159,8 @@ configureInputSection(void)
parsePrologue(XF86ConfInputPtr, XF86ConfInputRec)
- ptr->inp_identifier = "Keyboard0";
- ptr->inp_driver = "kbd";
+ ptr->inp_identifier = strdup("Keyboard0");
+ ptr->inp_driver = strdup("kbd");
ptr->list.next = NULL;
/* Crude mechanism to auto-detect mouse (os dependent) */
@@ -175,8 +175,8 @@ configureInputSection(void)
}
mouse = calloc(1, sizeof(XF86ConfInputRec));
- mouse->inp_identifier = "Mouse0";
- mouse->inp_driver = "mouse";
+ mouse->inp_identifier = strdup("Mouse0");
+ mouse->inp_driver = strdup("mouse");
mouse->inp_option_lst =
xf86addNewOption(mouse->inp_option_lst, strdup("Protocol"),
strdup(DFLT_MOUSE_PROTO));
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index 0fcf405d3..2871edd4c 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -279,8 +279,8 @@ typedef struct {
typedef struct {
GenericListRec list;
- const char *inp_identifier;
- const char *inp_driver;
+ char *inp_identifier;
+ char *inp_driver;
XF86OptionPtr inp_option_lst;
char *inp_comment;
} XF86ConfInputRec, *XF86ConfInputPtr;