Commit fba13bd5 authored by Max Kellermann's avatar Max Kellermann

playlist_queue: simplify error handler

Return early on error, save one level of indent.
parent 68f75955
......@@ -103,7 +103,9 @@ playlist_open_into_queue(const char *uri, struct playlist *dest)
struct input_stream *is;
struct playlist_provider *playlist = playlist_mapper_open(uri, &is);
if (playlist != NULL) {
if (playlist == NULL)
return PLAYLIST_RESULT_NO_SUCH_LIST;
enum playlist_result result =
playlist_load_into_queue(uri, playlist, dest);
playlist_plugin_close(playlist);
......@@ -112,7 +114,4 @@ playlist_open_into_queue(const char *uri, struct playlist *dest)
input_stream_close(is);
return result;
}
return PLAYLIST_RESULT_NO_SUCH_LIST;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment