aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-03 11:52:13 +0200
committerMax Kellermann <max@duempel.org>2008-10-03 11:52:13 +0200
commitf5b706fd865140da002f2e9f7af3b6f459aed115 (patch)
treec3534b9b23521b17fb2131b714904d14baa61a8d /src
parentaef462cd9dfcf7573e7bc6e812f0c75ddde359f6 (diff)
downloadmpd-f5b706fd865140da002f2e9f7af3b6f459aed115.tar.gz
mpd-f5b706fd865140da002f2e9f7af3b6f459aed115.tar.xz
mpd-f5b706fd865140da002f2e9f7af3b6f459aed115.zip
charset: pass -1 instead of strlen()
The GTK charset functions accept "-1" if the parameter is null terminated.
Diffstat (limited to 'src')
-rw-r--r--src/charset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/charset.c b/src/charset.c
index 095817d15..ccfac0ef8 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -71,7 +71,7 @@ utf8_to_locale(const char *utf8str)
if (noconvert)
return g_strdup(utf8str);
- str = g_convert_with_fallback(utf8str, strlen(utf8str),
+ str = g_convert_with_fallback(utf8str, -1,
charset, "utf-8",
NULL, NULL, NULL,
&error);
@@ -98,7 +98,7 @@ locale_to_utf8(const char *localestr)
if (noconvert)
return g_strdup(localestr);
- str = g_convert_with_fallback(localestr, strlen(localestr),
+ str = g_convert_with_fallback(localestr, -1,
"utf-8", charset,
NULL, NULL, NULL,
&error);