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>
This commit is contained in:
Peter Hutterer 2014-02-05 14:24:54 +10:00
parent 93bf954471
commit 46ae9d67e4
2 changed files with 6 additions and 6 deletions

View File

@ -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));

View File

@ -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;