]> git.ipfire.org Git - thirdparty/git.git/commitdiff
list-objects-filter-options: make parser void
authorMatthew DeVore <matvore@google.com>
Thu, 27 Jun 2019 22:54:14 +0000 (15:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 28 Jun 2019 15:41:53 +0000 (08:41 -0700)
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>
list-objects-filter-options.c
list-objects-filter-options.h

index 44bc1153d121b5bd91c02a1958286042f8256e3f..ba1425cb4a071f02e9daae57f3f7ce4194b12408 100644 (file)
@@ -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)
index d8bc7e946e59e97a1d87bf120acd8b423e533cea..db37dfb34a17402860eddd01607e610b751311f0 100644 (file)
@@ -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);