summaryrefslogtreecommitdiff
path: root/source4/intl/lang_tdb.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-08-24 15:38:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:17 -0500
commit527bafcf73a1daea0a7a19f0181d811cabea451d (patch)
tree76f5c9cc456a65c1d4e6b8880da8fce1d2525051 /source4/intl/lang_tdb.c
parent2ed6f07ccd05d5fa30c8cf53bf55db5f28f0ea50 (diff)
downloadsamba-527bafcf73a1daea0a7a19f0181d811cabea451d.tar.gz
samba-527bafcf73a1daea0a7a19f0181d811cabea451d.tar.bz2
samba-527bafcf73a1daea0a7a19f0181d811cabea451d.zip
r2017: fix compiler warnings
metze (This used to be commit eb75d9323fb07fe9a19bbf77168aeb8a4b92c3b8)
Diffstat (limited to 'source4/intl/lang_tdb.c')
-rw-r--r--source4/intl/lang_tdb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/intl/lang_tdb.c b/source4/intl/lang_tdb.c
index 6879d70d16..42f4d3a6dc 100644
--- a/source4/intl/lang_tdb.c
+++ b/source4/intl/lang_tdb.c
@@ -169,13 +169,13 @@ BOOL lang_tdb_init(const char *lang)
/* translate a msgid to a message string in the current language
returns a string that must be freed by calling lang_msg_free()
*/
-const char *lang_msg(const char *msgid)
+char *lang_msg(const char *msgid)
{
TDB_DATA key, data;
lang_tdb_init(NULL);
- if (!tdb) return msgid;
+ if (!tdb) return strdup(msgid);
key.dptr = strdup(msgid);
key.dsize = strlen(msgid)+1;
@@ -189,12 +189,12 @@ const char *lang_msg(const char *msgid)
if (!data.dptr)
return strdup(msgid);
- return (const char *)data.dptr;
+ return data.dptr;
}
/* free up a string from lang_msg() */
-void lang_msg_free(const char *msgstr)
+void lang_msg_free(char *msgstr)
{
if (!tdb) return;
free(msgstr);