diff options
author | Max Kellermann <max@duempel.org> | 2009-12-16 17:18:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-16 17:18:23 +0100 |
commit | c5cdac9609fe9c5409a177b2641253d86490751b (patch) | |
tree | a9d3dad75293909b572d17fe3ec740b4496b76c7 /src | |
parent | b7f55ad3927fae5cfd9b1fa34ae371c86fc7054a (diff) | |
download | mpd-c5cdac9609fe9c5409a177b2641253d86490751b.tar.gz mpd-c5cdac9609fe9c5409a177b2641253d86490751b.tar.xz mpd-c5cdac9609fe9c5409a177b2641253d86490751b.zip |
cue_tag: tag_new() cannot fail
Removed the NULL check.
Diffstat (limited to '')
-rw-r--r-- | src/cue/cue_tag.c | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/cue/cue_tag.c b/src/cue/cue_tag.c index e5334c94b..cc6748b8a 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* |