aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-29 09:38:56 +0200
committerMax Kellermann <max@duempel.org>2008-08-29 09:38:56 +0200
commit92b757674ebcf5cf90e8adb66e7583edf1bc604e (patch)
treeefc17648bad7853ac80529382f02ca3771317d3f
parentf99fe808117fb29fc8dfba8c2eb1b18472aa6faa (diff)
downloadmpd-92b757674ebcf5cf90e8adb66e7583edf1bc604e.tar.gz
mpd-92b757674ebcf5cf90e8adb66e7583edf1bc604e.tar.xz
mpd-92b757674ebcf5cf90e8adb66e7583edf1bc604e.zip
assert value!=NULL in fix_utf8()
We must never pass value==NULL to fix_utf(). Replace the run-time check with an assertion.
Diffstat (limited to '')
-rw-r--r--src/tag.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tag.c b/src/tag.c
index bb3ff08ac..a52391b42 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -350,7 +350,9 @@ int tag_equal(struct tag *tag1, struct tag *tag2)
static inline char *fix_utf8(char *str) {
char *temp;
- if (str != NULL && validUtf8String(str))
+ assert(str != NULL);
+
+ if (validUtf8String(str))
return str;
DEBUG("not valid utf8 in tag: %s\n",str);