wmaker: Added 'const' attribute to function 'wDefaultsInitDomain'
authorChristophe CURIS <christophe.curis@free.fr>
Sun, 16 Jun 2013 15:57:46 +0000 (16 17:57 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 16 Jun 2013 18:32:23 +0000 (16 19:32 +0100)
This has a few side effects which are properly handled by this patch

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
src/defaults.c
src/defaults.h

index a4f6bd6..e1c1a0f 100644 (file)
@@ -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) {
index 2f82fd6..dbba9c9 100644 (file)
 #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);