diff options
author | Max Kellermann <max@duempel.org> | 2008-09-07 13:37:20 +0200 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-09 00:55:39 -0700 |
commit | 99a7a9306b0fd9cf3587b8c0bc36258cac0d4ef6 (patch) | |
tree | 8f309ace4a0676c89a7e125945a2182a96ad7d25 | |
parent | b3a40661ffb4a0da1aefc7e7151bbf9e82f23cef (diff) | |
download | mpd-99a7a9306b0fd9cf3587b8c0bc36258cac0d4ef6.tar.gz mpd-99a7a9306b0fd9cf3587b8c0bc36258cac0d4ef6.tar.xz mpd-99a7a9306b0fd9cf3587b8c0bc36258cac0d4ef6.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.
[ew: fspath => utf8path]
-rw-r--r-- | src/storedPlaylist.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |