2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Use EXIT_SUCCESS and EXIT_FAILURE

Instead of randomly using -1 or 1 as a failure status, properly utilize
the EXIT_FAILURE define that's platform specific (as it should be).
This commit is contained in:
Ondřej Surý
2024-02-07 14:50:38 +01:00
parent e140743e6a
commit 76997983fd
41 changed files with 153 additions and 150 deletions

View File

@@ -892,7 +892,7 @@ parse_command_line(int argc, char *argv[]) {
printf("# Built-in default values. "
"This is NOT the run-time configuration!\n");
printf("%s", named_config_getdefault());
exit(0);
exit(EXIT_SUCCESS);
case 'd':
named_g_debuglevel = parse_int(isc_commandline_argument,
"debug "
@@ -955,10 +955,10 @@ parse_command_line(int argc, char *argv[]) {
break;
case 'v':
printversion(false);
exit(0);
exit(EXIT_SUCCESS);
case 'V':
printversion(true);
exit(0);
exit(EXIT_SUCCESS);
case 'x':
/* Obsolete. No longer in use. Ignore. */
break;
@@ -993,7 +993,7 @@ parse_command_line(int argc, char *argv[]) {
case '?':
usage();
if (isc_commandline_option == '?') {
exit(0);
exit(EXIT_SUCCESS);
}
p = strchr(NAMED_MAIN_ARGS, isc_commandline_option);
if (p == NULL || *++p != ':') {