From 92b757674ebcf5cf90e8adb66e7583edf1bc604e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 29 Aug 2008 09:38:56 +0200 Subject: [PATCH] assert value!=NULL in fix_utf8() We must never pass value==NULL to fix_utf(). Replace the run-time check with an assertion. --- src/tag.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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);