aboutsummaryrefslogtreecommitdiffstats
path: root/src/cue
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-16 17:18:23 +0100
committerMax Kellermann <max@duempel.org>2009-12-16 17:18:23 +0100
commitc5cdac9609fe9c5409a177b2641253d86490751b (patch)
treea9d3dad75293909b572d17fe3ec740b4496b76c7 /src/cue
parentb7f55ad3927fae5cfd9b1fa34ae371c86fc7054a (diff)
downloadmpd-c5cdac9609fe9c5409a177b2641253d86490751b.tar.gz
mpd-c5cdac9609fe9c5409a177b2641253d86490751b.tar.xz
mpd-c5cdac9609fe9c5409a177b2641253d86490751b.zip
cue_tag: tag_new() cannot fail
Removed the NULL check.
Diffstat (limited to 'src/cue')
-rw-r--r--src/cue/cue_tag.c32
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*