Skip to content

Commit 8cae8b7

Browse files
matvoregitster
authored andcommitted
list-objects-filter-options: make parser void
This function always returns 0, so make it return void instead. Signed-off-by: Matthew DeVore <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d82be52 commit 8cae8b7

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

list-objects-filter-options.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ void list_objects_filter_die_if_populated(
232232
die(_("multiple filter-specs cannot be combined"));
233233
}
234234

235-
int parse_list_objects_filter(
235+
void parse_list_objects_filter(
236236
struct list_objects_filter_options *filter_options,
237237
const char *arg)
238238
{
@@ -262,20 +262,18 @@ int parse_list_objects_filter(
262262
}
263263
if (parse_error)
264264
die("%s", errbuf.buf);
265-
return 0;
266265
}
267266

268267
int opt_parse_list_objects_filter(const struct option *opt,
269268
const char *arg, int unset)
270269
{
271270
struct list_objects_filter_options *filter_options = opt->value;
272271

273-
if (unset || !arg) {
272+
if (unset || !arg)
274273
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;
279277
}
280278

281279
const char *list_objects_filter_spec(struct list_objects_filter_options *filter)

list-objects-filter-options.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void list_objects_filter_die_if_populated(
7474
*
7575
* Dies and prints a user-facing message if an error occurs.
7676
*/
77-
int parse_list_objects_filter(
77+
void parse_list_objects_filter(
7878
struct list_objects_filter_options *filter_options,
7979
const char *arg);
8080

0 commit comments

Comments
 (0)