From 90d21f9ebf6906f0ebb4fb1b20ec9536072e2916 Mon Sep 17 00:00:00 2001 From: Matthew DeVore Date: Thu, 27 Jun 2019 15:54:14 -0700 Subject: list-objects-filter-options: make parser void This function always returns 0, so make it return void instead. Signed-off-by: Matthew DeVore Signed-off-by: Junio C Hamano diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c index 44bc115..ba1425c 100644 --- a/list-objects-filter-options.c +++ b/list-objects-filter-options.c @@ -232,7 +232,7 @@ void list_objects_filter_die_if_populated( die(_("multiple filter-specs cannot be combined")); } -int parse_list_objects_filter( +void parse_list_objects_filter( struct list_objects_filter_options *filter_options, const char *arg) { @@ -262,7 +262,6 @@ int parse_list_objects_filter( } if (parse_error) die("%s", errbuf.buf); - return 0; } int opt_parse_list_objects_filter(const struct option *opt, @@ -270,12 +269,11 @@ int opt_parse_list_objects_filter(const struct option *opt, { struct list_objects_filter_options *filter_options = opt->value; - if (unset || !arg) { + if (unset || !arg) list_objects_filter_set_no_filter(filter_options); - return 0; - } - - return parse_list_objects_filter(filter_options, arg); + else + parse_list_objects_filter(filter_options, arg); + return 0; } const char *list_objects_filter_spec(struct list_objects_filter_options *filter) diff --git a/list-objects-filter-options.h b/list-objects-filter-options.h index d8bc7e9..db37dfb 100644 --- a/list-objects-filter-options.h +++ b/list-objects-filter-options.h @@ -74,7 +74,7 @@ void list_objects_filter_die_if_populated( * * Dies and prints a user-facing message if an error occurs. */ -int parse_list_objects_filter( +void parse_list_objects_filter( struct list_objects_filter_options *filter_options, const char *arg); -- cgit v0.10.2-6-g49f6