Unify use of error codes across all exit statements

This commit is contained in:
Greg Smith
2011-02-10 17:49:34 -05:00
parent 7e7c45c61d
commit 78b925ea54
8 changed files with 49 additions and 25 deletions

View File

@@ -30,7 +30,7 @@ parse_config(const char* config_file, t_configuration_options* options)
if (fp == NULL) {
fprintf(stderr, _("Could not find configuration file '%s'\n"), config_file);
exit(1);
exit(ERR_BAD_CONFIG);
}
/* Initialize */
@@ -75,14 +75,14 @@ parse_config(const char* config_file, t_configuration_options* options)
{
fprintf(stderr, "Cluster name is missing. "
"Check the configuration file.\n");
exit(1);
exit(ERR_BAD_CONFIG);
}
if (config->node == -1)
{
fprintf(stderr, "Node information is missing. "
"Check the configuration file.\n");
exit(1);
exit(ERR_BAD_CONFIG);
}
}