]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - filter.c
Don't check return value of command line parsers unnecessarily.
[paraslash.git] / filter.c
index 07b78aed59e5d2a04c400003d2136cd2e956a1c4..84ad8577120daf92c338a842e0567da91fa9968b 100644 (file)
--- a/filter.c
+++ b/filter.c
@@ -65,8 +65,7 @@ static int parse_config(int argc, char *argv[])
        static char *cf; /* config file */
        struct stat statbuf;
 
-       if (filter_cmdline_parser(argc, argv, &conf))
-               return -E_FILTER_SYNTAX;
+       filter_cmdline_parser(argc, argv, &conf);
        HANDLE_VERSION_FLAG("filter", conf);
        if (conf.help_given || conf.detailed_help_given)
                print_help_and_die();
@@ -84,8 +83,7 @@ static int parse_config(int argc, char *argv[])
                        .check_ambiguity = 0,
                        .print_errors = 1
                };
-               if (filter_cmdline_parser_config_file(cf, &conf, &params))
-                       return -E_FILTER_SYNTAX;
+               filter_cmdline_parser_config_file(cf, &conf, &params);
        }
        if (!conf.filter_given)
                return -E_NO_FILTERS;
@@ -140,13 +138,7 @@ int main(int argc, char *argv[])
                        EMBRACE(.name = f->name, .parent = parent,
                        .handler = f->execute, .context = fn));
                fn->task.pre_select = f->pre_select;
-               if (f->new_post_select) {
-                       fn->task.new_post_select = f->new_post_select;
-                       fn->task.post_select = NULL;
-               } else {
-                       fn->task.new_post_select = NULL;
-                       fn->task.post_select = f->post_select;
-               }
+               fn->task.post_select = f->post_select;
                f->open(fn);
                register_task(&s, &fn->task);
                parent = fn->btrn;