Commit c6cf8e99 authored by Max Kellermann's avatar Max Kellermann

TagId3: gcc_unlikely instead of G_UNLIKELY

parent 0c53e8c2
......@@ -96,9 +96,8 @@ import_id3_string(bool is_id3v1, const id3_ucs4_t *ucs4)
if (is_id3v1 &&
(encoding = config_get_string(CONF_ID3V1_ENCODING, nullptr)) != nullptr) {
isostr = id3_ucs4_latin1duplicate(ucs4);
if (G_UNLIKELY(!isostr)) {
if (gcc_unlikely(isostr == nullptr))
return nullptr;
}
utf8 = (id3_utf8_t *)
g_convert_with_fallback((const char*)isostr, -1,
......@@ -115,9 +114,8 @@ import_id3_string(bool is_id3v1, const id3_ucs4_t *ucs4)
g_free(isostr);
} else {
utf8 = id3_ucs4_utf8duplicate(ucs4);
if (G_UNLIKELY(!utf8)) {
if (gcc_unlikely(utf8 == nullptr))
return nullptr;
}
}
utf8_stripped = (id3_utf8_t *)g_strdup(g_strstrip((gchar *)utf8));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment