aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-07 13:37:20 +0200
committerMax Kellermann <max@duempel.org>2008-09-07 13:37:20 +0200
commit54c8e3daafd2e85316662beae2ee78f6d0b0df44 (patch)
tree085ac7d052b2754c8e8250067de791701ce1c35e
parentdc353eca802d8889dd868188d977fb0957cc8554 (diff)
downloadmpd-54c8e3daafd2e85316662beae2ee78f6d0b0df44.tar.gz
mpd-54c8e3daafd2e85316662beae2ee78f6d0b0df44.tar.xz
mpd-54c8e3daafd2e85316662beae2ee78f6d0b0df44.zip
playlist: replaced run-time check with assertion
The "fspath" argument of writeStoredPlaylistToPath() must never be NULL. There should be an assertion on that, instead of a run-time check.
Diffstat (limited to '')
-rw-r--r--src/storedPlaylist.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/storedPlaylist.c b/src/storedPlaylist.c
index a38511ea1..b806ecf0b 100644
--- a/src/storedPlaylist.c
+++ b/src/storedPlaylist.c
@@ -66,8 +66,7 @@ static int writeStoredPlaylistToPath(int fd, List *list, const char *fspath)
FILE *file;
char *s;
- if (fspath == NULL)
- return -1;
+ assert(fspath != NULL);
while (!(file = fopen(fspath, "w")) && errno == EINTR);
if (file == NULL) {