From 634c54310c92c48dd4eceec602e230a021bdcfc5 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 3 Jan 2003 08:28:12 +0000 Subject: Merge from HEAD - make Samba compile with -Wwrite-strings without additional warnings. (Adds a lot of const). Andrew Bartlett (This used to be commit 3a7458f9472432ef12c43008414925fd1ce8ea0c) --- source3/intl/lang_tdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/intl') diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c index 2c22d4ab5f..87ef4e39c7 100644 --- a/source3/intl/lang_tdb.c +++ b/source3/intl/lang_tdb.c @@ -75,9 +75,9 @@ static BOOL load_msg(const char *msg_file) /* work out what language to use from locale variables */ -static char *get_lang(void) +static const char *get_lang(void) { - char *vars[] = {"LANGUAGE", "LC_ALL", "LC_LANG", "LANG", NULL}; + const char *vars[] = {"LANGUAGE", "LC_ALL", "LC_LANG", "LANG", NULL}; int i; char *p; @@ -123,7 +123,7 @@ BOOL lang_tdb_init(const char *lang) /* if no lang then we don't translate */ if (!lang) return True; - asprintf(&msg_path, "%s.msg", lib_path((char *)lang)); + asprintf(&msg_path, "%s.msg", lib_path((const char *)lang)); if (stat(msg_path, &st) != 0) { /* the msg file isn't available */ free(msg_path); -- cgit