Commit c5cdac96 authored by Max Kellermann's avatar Max Kellermann

cue_tag: tag_new() cannot fail

Removed the NULL check.
parent b7f55ad3
...@@ -86,18 +86,12 @@ cue_tag_cd(struct Cdtext* cdtext, struct Rem* rem) ...@@ -86,18 +86,12 @@ cue_tag_cd(struct Cdtext* cdtext, struct Rem* rem)
tag_end_add(tag); tag_end_add(tag);
if (tag != NULL) if (tag_is_empty(tag)) {
{
if (tag_is_empty(tag))
{
tag_free(tag); tag_free(tag);
return NULL; return NULL;
} }
else
return tag; return tag;
}
else
return NULL;
} }
static struct tag* static struct tag*
...@@ -157,18 +151,12 @@ cue_tag_track(struct Cdtext* cdtext, struct Rem* rem) ...@@ -157,18 +151,12 @@ cue_tag_track(struct Cdtext* cdtext, struct Rem* rem)
tag_end_add(tag); tag_end_add(tag);
if (tag != NULL) if (tag_is_empty(tag)) {
{
if (tag_is_empty(tag))
{
tag_free(tag); tag_free(tag);
return NULL; return NULL;
} }
else
return tag; return tag;
}
else
return NULL;
} }
struct tag* struct tag*
......
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