diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2018-03-15 15:34:45 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-03-16 13:26:52 +0400 |
commit | 0a534348c75cf435d2017959855de2efa798fd0b (patch) | |
tree | 48c7ee2f194ccf375877e4be7014c56e6adf8601 /extra | |
parent | 7033af9e81a69d75199faa028f8959667f755551 (diff) | |
download | mariadb-git-0a534348c75cf435d2017959855de2efa798fd0b.tar.gz |
MDEV-14265 - RPMLint warning: shared-lib-calls-exit
Eliminated last exit() call from libmysqld.
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mariabackup/xbcloud.cc | 4 | ||||
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 12 | ||||
-rw-r--r-- | extra/my_print_defaults.c | 6 |
3 files changed, 9 insertions, 13 deletions
diff --git a/extra/mariabackup/xbcloud.cc b/extra/mariabackup/xbcloud.cc index 56661b03dd0..878b4c81023 100644 --- a/extra/mariabackup/xbcloud.cc +++ b/extra/mariabackup/xbcloud.cc @@ -443,9 +443,7 @@ int parse_args(int argc, char **argv) exit(EXIT_FAILURE); } - if (load_defaults("my", load_default_groups, &argc, &argv)) { - exit(EXIT_FAILURE); - } + load_defaults_or_exit("my", load_default_groups, &argc, &argv); if (handle_options(&argc, &argv, my_long_options, get_one_option)) { exit(EXIT_FAILURE); diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 2228e542dc7..44214b0c207 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -6350,10 +6350,8 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server) *argv_client = argv; *argv_server = argv; - if (load_defaults(conf_file, xb_server_default_groups, - &argc_server, argv_server)) { - exit(EXIT_FAILURE); - } + load_defaults_or_exit(conf_file, xb_server_default_groups, + &argc_server, argv_server); int n; for (n = 0; (*argv_server)[n]; n++) {}; @@ -6403,10 +6401,8 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server) xb_server_options, xb_get_one_option))) exit(ho_error); - if (load_defaults(conf_file, xb_client_default_groups, - &argc_client, argv_client)) { - exit(EXIT_FAILURE); - } + load_defaults_or_exit(conf_file, xb_client_default_groups, + &argc_client, argv_client); for (n = 0; (*argv_client)[n]; n++) {}; argc_client = n; diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c index 78940e02ca4..07c95a79ddc 100644 --- a/extra/my_print_defaults.c +++ b/extra/my_print_defaults.c @@ -206,6 +206,9 @@ int main(int argc, char **argv) if ((error= load_defaults(config_file, (const char **) load_default_groups, &count, &arguments))) { + my_end(0); + if (error == 4) + return 0; if (verbose && opt_defaults_file_used) { if (error == 1) @@ -216,8 +219,7 @@ int main(int argc, char **argv) fprintf(stderr, "WARNING: Defaults file '%s' is not a regular file!\n", config_file); } - error= 2; - exit(error); + return 2; } for (argument= arguments+1 ; *argument ; argument++) |