aboutsummaryrefslogtreecommitdiffstats
path: root/src/song.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/song.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/song.c b/src/song.c
index 9436df97c..75dd0257f 100644
--- a/src/song.c
+++ b/src/song.c
@@ -28,17 +28,6 @@
#include "os_compat.h"
-Song *newNullSong(void)
-{
- Song *song = xmalloc(sizeof(Song));
-
- song->tag = NULL;
- song->url = NULL;
- song->type = SONG_TYPE_FILE;
- song->parentDir = NULL;
-
- return song;
-}
Song *newSong(const char *url, enum song_type type, Directory * parentDir)
{
@@ -49,8 +38,8 @@ Song *newSong(const char *url, enum song_type type, Directory * parentDir)
return NULL;
}
- song = newNullSong();
-
+ song = xmalloc(sizeof(*song));
+ song->tag = NULL;
song->url = xstrdup(url);
song->type = type;
song->parentDir = parentDir;