aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-04 17:26:15 +0100
committerMax Kellermann <max@duempel.org>2009-01-04 17:26:15 +0100
commit8a562c9c7132aef079bcc97f5d7a91d5ba7ab88c (patch)
tree50f6229c9830f6915b15637bc989551adcdce7c1
parent77d3643036573ad55cdfc45ed197996d7a5c28d2 (diff)
downloadmpd-8a562c9c7132aef079bcc97f5d7a91d5ba7ab88c.tar.gz
mpd-8a562c9c7132aef079bcc97f5d7a91d5ba7ab88c.tar.xz
mpd-8a562c9c7132aef079bcc97f5d7a91d5ba7ab88c.zip
song: removed duplicate '\n' check
Newline characters are already checked in skip_path() (update.c).
-rw-r--r--src/song.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/song.c b/src/song.c
index 323262512..19abb963f 100644
--- a/src/song.c
+++ b/src/song.c
@@ -71,11 +71,8 @@ song_file_load(const char *path, struct directory *parent)
bool ret;
assert((parent == NULL) == (*path == '/'));
-
- if (strchr(path, '\n')) {
- g_debug("newSong: '%s' is not a valid uri\n", path);
- return NULL;
- }
+ assert(!uri_has_scheme(path));
+ assert(strchr(path, '\n') == NULL);
song = song_file_new(path, parent);