aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 19:50:22 +0100
committerMax Kellermann <max@duempel.org>2009-01-04 19:50:22 +0100
commit530f0b71de6d0e44911528eb4e256d165ed77c31 (patch)
treeec16d3a8c11d6fa6617e7adbe110447912188230 /src/tag.c
parentda693822730d1712d44da85389e4d8b659b3b5df (diff)
downloadmpd-530f0b71de6d0e44911528eb4e256d165ed77c31.tar.gz
mpd-530f0b71de6d0e44911528eb4e256d165ed77c31.tar.xz
mpd-530f0b71de6d0e44911528eb4e256d165ed77c31.zip
path, tag: don't allocate GError for charset conversion
Pass NULL instead of &error to g_convert(). We're not interested in the error object.
Diffstat (limited to 'src/tag.c')
-rw-r--r--src/tag.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/tag.c b/src/tag.c
index 343f4d91c..df32585c4 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -406,7 +406,6 @@ static char *
fix_utf8(const char *str, size_t length)
{
char *temp;
- GError *error = NULL;
gsize written;
assert(str != NULL);
@@ -416,11 +415,9 @@ fix_utf8(const char *str, size_t length)
DEBUG("not valid utf8 in tag: %s\n",str);
temp = g_convert(str, length, "utf-8", "iso-8859-1",
- NULL, &written, &error);
- if (temp == NULL) {
- g_error_free(error);
+ NULL, &written, NULL);
+ if (temp == NULL)
return NULL;
- }
return temp;
}