From 03cddd0acf481f34709e7a1b061d4d451b09285a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 19 Oct 2013 16:29:56 +0200 Subject: FilterConfig: return bool --- src/FilterConfig.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/FilterConfig.cxx') 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; } -- cgit v1.2.3