From 99a7a9306b0fd9cf3587b8c0bc36258cac0d4ef6 Mon Sep 17 00:00:00 2001 From: Max Kellermann 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. [ew: fspath => utf8path] --- src/storedPlaylist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storedPlaylist.c b/src/storedPlaylist.c index 332f99456..b62ca42e4 100644 --- a/src/storedPlaylist.c +++ b/src/storedPlaylist.c @@ -67,7 +67,9 @@ static int writeStoredPlaylistToPath(int fd, List *list, const char *utf8path) char *s; char path_max_tmp[MPD_PATH_MAX]; - if (!utf8path || !valid_playlist_name(fd, utf8path)) + assert(utf8path); + + if (!valid_playlist_name(fd, utf8path)) return -1; utf8_to_fs_playlist_path(path_max_tmp, utf8path); -- cgit v1.2.3