diff options
author | Max Kellermann <max@duempel.org> | 2013-10-19 16:29:56 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-19 16:29:56 +0200 |
commit | 03cddd0acf481f34709e7a1b061d4d451b09285a (patch) | |
tree | 78a2282b718802544548282e235e007ccc39a59b /src/FilterConfig.cxx | |
parent | 04a737e04cccaf6c7b609ad45992bbf60b037904 (diff) | |
download | mpd-03cddd0acf481f34709e7a1b061d4d451b09285a.tar.gz mpd-03cddd0acf481f34709e7a1b061d4d451b09285a.tar.xz mpd-03cddd0acf481f34709e7a1b061d4d451b09285a.zip |
FilterConfig: return bool
Diffstat (limited to 'src/FilterConfig.cxx')
-rw-r--r-- | src/FilterConfig.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/FilterConfig.cxx b/src/FilterConfig.cxx index 2af44b9c0..0b0509af3 100644 --- a/src/FilterConfig.cxx +++ b/src/FilterConfig.cxx @@ -86,15 +86,12 @@ filter_chain_append_new(Filter &chain, const char *template_name, Error &error) return true; } -unsigned int +bool filter_chain_parse(Filter &chain, const char *spec, Error &error) { - // Split on comma gchar** tokens = g_strsplit_set(spec, ",", 255); - unsigned added_filters = 0; - // Add each name to the filter chain by instantiating an actual filter char **template_names = tokens; while (*template_names != NULL) { @@ -102,14 +99,12 @@ filter_chain_parse(Filter &chain, const char *spec, Error &error) g_strstrip(*template_names); if (!filter_chain_append_new(chain, *template_names, error)) - break; - - ++added_filters; + return false; ++template_names; } g_strfreev(tokens); - return added_filters; + return true; } |