summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 25a07c7)
raw | patch | inline | side by side (parent: 25a07c7)
author | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 12:22:45 +0000 (13:22 +0100) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 7 Nov 2008 12:22:45 +0000 (13:22 +0100) |
Since the GError return value of g_convert_*() is ignored by ncmpc, we
don't need to retrieve it at all.
don't need to retrieve it at all.
src/charset.c | patch | blob | history |
diff --git a/src/charset.c b/src/charset.c
index 5625f12771305065987c342e160759cd89e3af53..a0e8bbda4dca3fb07ff55f05d622274502361f6a 100644 (file)
--- a/src/charset.c
+++ b/src/charset.c
{
#ifdef HAVE_LOCALE_H
gchar *str;
- GError *error;
assert(utf8str != NULL);
str = g_convert_with_fallback(utf8str, -1,
charset, "utf-8",
- NULL, NULL, NULL,
- &error);
- if (str == NULL) {
- g_error_free(error);
+ NULL, NULL, NULL, NULL);
+ if (str == NULL)
return g_strdup(utf8str);
- }
return str;
#else
{
#ifdef HAVE_LOCALE_H
gchar *str;
- GError *error;
assert(localestr != NULL);
str = g_convert_with_fallback(localestr, -1,
"utf-8", charset,
- NULL, NULL, NULL,
- &error);
- if (str == NULL) {
- g_error_free(error);
+ NULL, NULL, NULL, NULL);
+ if (str == NULL)
return g_strdup(localestr);
- }
return str;
#else