1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

cleanup: my_getopt, get_one_option isn't optional

it turns out that practically every single user of handle_options()
used the get_one_option callback. Simplify the code,
make it mandatory, adjust unit tests.
This commit is contained in:
Sergei Golubchik
2019-09-29 20:30:28 +02:00
parent eb3431d529
commit 3ea51b518b
3 changed files with 37 additions and 48 deletions

View File

@@ -110,7 +110,8 @@ extern my_error_reporter my_getopt_error_reporter;
extern my_getopt_value my_getopt_get_addr;
extern int handle_options (int *argc, char ***argv,
const struct my_option *longopts, my_get_one_option);
const struct my_option *longopts, my_get_one_option)
__attribute__((nonnull));
extern void my_cleanup_options(const struct my_option *options);
extern void my_print_help(const struct my_option *options);
extern void my_print_variables(const struct my_option *options);