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>

Matthew DeVore committed Jun 27, 2019 at 15:54 UTC 90d21f9ebf6906f0ebb4fb1b20ec9536072e2916
2 files changed +6 -8
list-objects-filter-options.c
+5 -7
@@ -232,7 +232,7 @@ void list_objects_filter_die_if_populated(
232 die(_("multiple filter-specs cannot be combined"));
233 }
234
235 -int parse_list_objects_filter(
235 +void parse_list_objects_filter(
236 struct list_objects_filter_options *filter_options,
237 const char *arg)
238 {
@@ -262,7 +262,6 @@ int parse_list_objects_filter(
262 }
263 if (parse_error)
264 die("%s", errbuf.buf);
265 - return 0;
265 }
266
267 int opt_parse_list_objects_filter(const struct option *opt,
@@ -270,12 +269,11 @@ int opt_parse_list_objects_filter(const struct option *opt,
269 {
270 struct list_objects_filter_options *filter_options = opt->value;
271
273 - if (unset || !arg) {
272 + if (unset || !arg)
273 list_objects_filter_set_no_filter(filter_options);
275 - return 0;
276 - }
277 -
278 - return parse_list_objects_filter(filter_options, arg);
274 + else
275 + parse_list_objects_filter(filter_options, arg);
276 + return 0;
277 }
278
279 const char *list_objects_filter_spec(struct list_objects_filter_options *filter)
list-objects-filter-options.h
+1 -1
@@ -74,7 +74,7 @@ void list_objects_filter_die_if_populated(
74 *
75 * Dies and prints a user-facing message if an error occurs.
76 */
77 -int parse_list_objects_filter(
77 +void parse_list_objects_filter(
78 struct list_objects_filter_options *filter_options,
79 const char *arg);
80