Changing all calls to ERROR() followed by exit(EXIT_FAILURE) with a single

call to FATAL().

git-svn-id: https://svn.musicpd.org/mpd/trunk@6276 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
J. Alexander Treuman
2007-05-26 18:15:54 +00:00
parent dba45a5992
commit bba444524e
21 changed files with 135 additions and 273 deletions

View File

@@ -585,10 +585,9 @@ void initInterfaces(void)
if (param) {
interface_timeout = strtol(param->value, &test, 10);
if (*test != '\0' || interface_timeout <= 0) {
ERROR("connection timeout \"%s\" is not a positive "
FATAL("connection timeout \"%s\" is not a positive "
"integer, line %i\n", CONF_CONN_TIMEOUT,
param->line);
exit(EXIT_FAILURE);
}
}
@@ -597,9 +596,8 @@ void initInterfaces(void)
if (param) {
interface_max_connections = strtol(param->value, &test, 10);
if (*test != '\0' || interface_max_connections <= 0) {
ERROR("max connections \"%s\" is not a positive integer"
FATAL("max connections \"%s\" is not a positive integer"
", line %i\n", param->value, param->line);
exit(EXIT_FAILURE);
}
} else
interface_max_connections = INTERFACE_MAX_CONNECTIONS_DEFAULT;
@@ -610,9 +608,8 @@ void initInterfaces(void)
interface_max_command_list_size = strtol(param->value,
&test, 10);
if (*test != '\0' || interface_max_command_list_size <= 0) {
ERROR("max command list size \"%s\" is not a positive "
FATAL("max command list size \"%s\" is not a positive "
"integer, line %i\n", param->value, param->line);
exit(EXIT_FAILURE);
}
interface_max_command_list_size *= 1024;
}
@@ -623,9 +620,8 @@ void initInterfaces(void)
interface_max_output_buffer_size = strtol(param->value,
&test, 10);
if (*test != '\0' || interface_max_output_buffer_size <= 0) {
ERROR("max output buffer size \"%s\" is not a positive "
FATAL("max output buffer size \"%s\" is not a positive "
"integer, line %i\n", param->value, param->line);
exit(EXIT_FAILURE);
}
interface_max_output_buffer_size *= 1024;
}