assert value!=NULL in fix_utf8()

We must never pass value==NULL to fix_utf().  Replace the run-time
check with an assertion.
This commit is contained in:
Max Kellermann 2008-08-29 09:38:56 +02:00
parent f99fe80811
commit 92b757674e

View File

@ -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);