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.
This commit is contained in:
parent
dc353eca80
commit
54c8e3daaf
@ -66,8 +66,7 @@ static int writeStoredPlaylistToPath(int fd, List *list, const char *fspath)
|
|||||||
FILE *file;
|
FILE *file;
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
if (fspath == NULL)
|
assert(fspath != NULL);
|
||||||
return -1;
|
|
||||||
|
|
||||||
while (!(file = fopen(fspath, "w")) && errno == EINTR);
|
while (!(file = fopen(fspath, "w")) && errno == EINTR);
|
||||||
if (file == NULL) {
|
if (file == NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user