Skip to content

Commit

Permalink
list-objects-filter-options: make parser void
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
matvore authored and gitster committed Jun 28, 2019
1 parent 5a133e8 commit 90d21f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions list-objects-filter-options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -262,20 +262,18 @@ int parse_list_objects_filter(
}
if (parse_error)
die("%s", errbuf.buf);
return 0;
}

int opt_parse_list_objects_filter(const struct option *opt,
const char *arg, int unset)
{
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)
Expand Down
2 changes: 1 addition & 1 deletion list-objects-filter-options.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 90d21f9

Please sign in to comment.