From c5cdac9609fe9c5409a177b2641253d86490751b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 16 Dec 2009 17:18:23 +0100 Subject: cue_tag: tag_new() cannot fail Removed the NULL check. --- src/cue/cue_tag.c | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'src/cue') diff --git a/src/cue/cue_tag.c b/src/cue/cue_tag.c index e5334c94..cc6748b8 100644 --- a/src/cue/cue_tag.c +++ b/src/cue/cue_tag.c @@ -86,18 +86,12 @@ cue_tag_cd(struct Cdtext* cdtext, struct Rem* rem) tag_end_add(tag); - if (tag != NULL) - { - if (tag_is_empty(tag)) - { - tag_free(tag); - return NULL; - } - else - return tag; - } - else + if (tag_is_empty(tag)) { + tag_free(tag); return NULL; + } + + return tag; } static struct tag* @@ -157,18 +151,12 @@ cue_tag_track(struct Cdtext* cdtext, struct Rem* rem) tag_end_add(tag); - if (tag != NULL) - { - if (tag_is_empty(tag)) - { - tag_free(tag); - return NULL; - } - else - return tag; - } - else + if (tag_is_empty(tag)) { + tag_free(tag); return NULL; + } + + return tag; } struct tag* -- cgit v1.2.3