cue_tag: tag_new() cannot fail

Removed the NULL check.
This commit is contained in:
Max Kellermann 2009-12-16 17:18:23 +01:00
parent b7f55ad392
commit c5cdac9609

View File

@ -86,19 +86,13 @@ 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*
cue_tag_track(struct Cdtext* cdtext, struct Rem* rem) cue_tag_track(struct Cdtext* cdtext, struct Rem* rem)
@ -157,19 +151,13 @@ 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*
cue_tag_file( FILE* fp, cue_tag_file( FILE* fp,