]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
util: Delete unused argconfig help function
authorTokunori Ikegami <ikegami.t@gmail.com>
Sat, 29 Apr 2023 15:24:29 +0000 (00:24 +0900)
committerDaniel Wagner <wagi@monom.org>
Tue, 2 May 2023 09:35:10 +0000 (11:35 +0200)
Signed-off-by: Tokunori Ikegami <ikegami.t@gmail.com>
util/argconfig.c
util/argconfig.h

index a48a1c4bbca7bb5db19a06a9a46e87e508501927..06dde3cfa413937a50c6e01cb8bc6a9ac771e075 100644 (file)
@@ -48,8 +48,6 @@
 #define fallthrough do {} while (0)
 #endif
 
-static argconfig_help_func *help_funcs[MAX_HELP_FUNC] = { NULL };
-
 static char END_DEFAULT[] = "__end_default__";
 
 static const char *append_usage_str = "";
@@ -596,19 +594,6 @@ int argconfig_parse_comma_sep_array_long(char *string,
        }
 }
 
-void argconfig_register_help_func(argconfig_help_func * f)
-{
-       int i;
-       for (i = 0; i < MAX_HELP_FUNC; i++) {
-               if (help_funcs[i] == NULL) {
-                       help_funcs[i] = f;
-                       if (i < MAX_HELP_FUNC - 1)
-                               help_funcs[i + 1] = NULL;
-                       break;
-               }
-       }
-}
-
 bool argconfig_parse_seen(struct argconfig_commandline_options *s,
                          const char *option)
 {
index 81eaaf405e53d78d8a72b8db21623f25c9f6755c..b71694781122ab30d24de60acdde586f83b14094 100644 (file)
@@ -114,9 +114,7 @@ struct argconfig_commandline_options {
 };
 
 #define CFG_MAX_SUBOPTS 500
-#define MAX_HELP_FUNC 20
 
-typedef void argconfig_help_func();
 void argconfig_append_usage(const char *str);
 void argconfig_print_help(const char *program_desc,
                          struct argconfig_commandline_options *options);
@@ -132,7 +130,6 @@ int argconfig_parse_comma_sep_array_long(char *string,
                                              unsigned long long *ret,
                                              unsigned max_length);
 int argconfig_parse_byte(const char *opt, const char *str, unsigned char *val);
-void argconfig_register_help_func(argconfig_help_func * f);
 
 void print_word_wrapped(const char *s, int indent, int start, FILE *stream);
 bool argconfig_parse_seen(struct argconfig_commandline_options *options,