From f14d6647c0883d4e7e4de7645d7a18e4d301845e Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 5 Feb 2014 14:30:50 +1000 Subject: [PATCH] xfree86: unconstify another string Only Xorg -configure uses a hardcoded value here, so let's not change the rest of the server for that. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard --- hw/xfree86/common/xf86Configure.c | 4 ++-- hw/xfree86/parser/xf86Parser.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index 5fc13997d..6aaf634a4 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -337,7 +337,7 @@ configureLayoutSection(void) iptr = malloc(sizeof(XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; - iptr->iref_inputdev_str = "Mouse0"; + iptr->iref_inputdev_str = strdup("Mouse0"); iptr->iref_option_lst = xf86addNewOption(iptr->iref_option_lst, strdup("CorePointer"), NULL); @@ -351,7 +351,7 @@ configureLayoutSection(void) iptr = malloc(sizeof(XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; - iptr->iref_inputdev_str = "Keyboard0"; + iptr->iref_inputdev_str = strdup("Keyboard0"); iptr->iref_option_lst = xf86addNewOption(iptr->iref_option_lst, strdup("CoreKeyboard"), NULL); diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h index 2871edd4c..d352d4b9b 100644 --- a/hw/xfree86/parser/xf86Parser.h +++ b/hw/xfree86/parser/xf86Parser.h @@ -288,7 +288,7 @@ typedef struct { typedef struct { GenericListRec list; XF86ConfInputPtr iref_inputdev; - const char *iref_inputdev_str; + char *iref_inputdev_str; XF86OptionPtr iref_option_lst; } XF86ConfInputrefRec, *XF86ConfInputrefPtr;