From 69b684818713988322931a4b878484479d77836d Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 16 Jun 2013 17:57:46 +0200 Subject: [PATCH] wmaker: Added 'const' attribute to function 'wDefaultsInitDomain' This has a few side effects which are properly handled by this patch Signed-off-by: Christophe CURIS --- src/defaults.c | 6 +++--- src/defaults.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/defaults.c b/src/defaults.c index a4f6bd69..e1c1a0fa 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -801,7 +801,7 @@ static void initDefaults(void) } } -static WMPropList *readGlobalDomain(char *domainName, Bool requireDictionary) +static WMPropList *readGlobalDomain(const char *domainName, Bool requireDictionary) { WMPropList *globalDict = NULL; char path[PATH_MAX]; @@ -887,12 +887,12 @@ void wDefaultsMergeGlobalMenus(WDDomain * menuDomain) menuDomain->dictionary = menu; } -WDDomain *wDefaultsInitDomain(char *domain, Bool requireDictionary) +WDDomain *wDefaultsInitDomain(const char *domain, Bool requireDictionary) { WDDomain *db; struct stat stbuf; static int inited = 0; - char *the_path; + const char *the_path; WMPropList *shared_dict = NULL; if (!inited) { diff --git a/src/defaults.h b/src/defaults.h index 2f82fd6c..dbba9c9a 100644 --- a/src/defaults.h +++ b/src/defaults.h @@ -22,13 +22,13 @@ #define WMDEFAULTS_H_ typedef struct WDDomain { - char *domain_name; + const char *domain_name; WMPropList *dictionary; - char *path; + const char *path; time_t timestamp; } WDDomain; -WDDomain * wDefaultsInitDomain(char *domain, Bool requireDictionary); +WDDomain * wDefaultsInitDomain(const char *domain, Bool requireDictionary); void wDefaultsMergeGlobalMenus(WDDomain *menuDomain);