From 54c8e3daafd2e85316662beae2ee78f6d0b0df44 Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Sun, 7 Sep 2008 13:37:20 +0200
Subject: 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.
---
 src/storedPlaylist.c | 3 +--
 1 file changed, 1 insertion(+), 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) {
-- 
cgit v1.2.3