Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew DeVore <matvore@google.com>2019-06-28 01:54:14 +0300
committerJunio C Hamano <gitster@pobox.com>2019-06-28 18:41:53 +0300
commit90d21f9ebf6906f0ebb4fb1b20ec9536072e2916 (patch)
tree5a77a6dd1574984774484068ccdf507f68cd3c6f /list-objects-filter-options.c
parent5a133e8a7f7c28c57f7a0a85e57692b8b781d896 (diff)
list-objects-filter-options: make parser void
This function always returns 0, so make it return void instead. Signed-off-by: Matthew DeVore <matvore@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects-filter-options.c')
-rw-r--r--list-objects-filter-options.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c
index 44bc1153d1..ba1425cb4a 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)