diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2007-05-26 18:15:54 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2007-05-26 18:15:54 +0000 |
commit | bba444524eca700970f69261bc470fb01a138222 (patch) | |
tree | 7d5e302586ed757a6eb3f71a27f84bba60383fd4 /src/song.c | |
parent | dba45a59928301da0faa4ec679eb1a3a81d5fba5 (diff) | |
download | mpd-bba444524eca700970f69261bc470fb01a138222.tar.gz mpd-bba444524eca700970f69261bc470fb01a138222.tar.xz mpd-bba444524eca700970f69261bc470fb01a138222.zip |
Changing all calls to ERROR() followed by exit(EXIT_FAILURE) with a single
call to FATAL().
git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/song.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/song.c b/src/song.c index 6d8092b55..9bcb1a0b4 100644 --- a/src/song.c +++ b/src/song.c @@ -251,10 +251,8 @@ void readSongInfoIntoList(FILE * fp, SongList * list, Directory * parentDir) song->type = SONG_TYPE_FILE; song->parentDir = parentDir; } else if (0 == strncmp(SONG_FILE, buffer, strlen(SONG_FILE))) { - if (!song) { - ERROR("Problems reading song info\n"); - exit(EXIT_FAILURE); - } + if (!song) + FATAL("Problems reading song info\n"); /* we don't need this info anymore song->url = xstrdup(&(buffer[strlen(SONG_FILE)])); */ @@ -273,10 +271,8 @@ void readSongInfoIntoList(FILE * fp, SongList * list, Directory * parentDir) song->mtime = atoi(&(buffer[strlen(SONG_MTIME)])); } /* ignore empty lines (starting with '\0') */ - else if (*buffer) { - ERROR("songinfo: unknown line in db: %s\n", buffer); - exit(EXIT_FAILURE); - } + else if (*buffer) + FATAL("songinfo: unknown line in db: %s\n", buffer); } if (song) { |