From bba444524eca700970f69261bc470fb01a138222 Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Sat, 26 May 2007 18:15:54 +0000 Subject: 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 --- src/inputStream_http.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) (limited to 'src/inputStream_http.c') diff --git a/src/inputStream_http.c b/src/inputStream_http.c index 152fa4760..3f18575dd 100644 --- a/src/inputStream_http.c +++ b/src/inputStream_http.c @@ -81,9 +81,8 @@ void inputStream_initHttp(void) param = getConfigParam(CONF_HTTP_PROXY_PORT); if (!param) { - ERROR("%s specified but not %s", CONF_HTTP_PROXY_HOST, + FATAL("%s specified but not %s", CONF_HTTP_PROXY_HOST, CONF_HTTP_PROXY_PORT); - exit(EXIT_FAILURE); } proxyPort = param->value; @@ -95,10 +94,9 @@ void inputStream_initHttp(void) param = getConfigParam(CONF_HTTP_PROXY_PASSWORD); if (!param) { - ERROR("%s specified but not %s\n", + FATAL("%s specified but not %s\n", CONF_HTTP_PROXY_USER, CONF_HTTP_PROXY_PASSWORD); - exit(EXIT_FAILURE); } proxyPassword = param->value; @@ -106,24 +104,20 @@ void inputStream_initHttp(void) param = getConfigParam(CONF_HTTP_PROXY_PASSWORD); if (param) { - ERROR("%s specified but not %s\n", + FATAL("%s specified but not %s\n", CONF_HTTP_PROXY_PASSWORD, CONF_HTTP_PROXY_USER); - exit(EXIT_FAILURE); } } } else if ((param = getConfigParam(CONF_HTTP_PROXY_PORT))) { - ERROR("%s specified but not %s, line %i\n", + FATAL("%s specified but not %s, line %i\n", CONF_HTTP_PROXY_PORT, CONF_HTTP_PROXY_HOST, param->line); - exit(EXIT_FAILURE); } else if ((param = getConfigParam(CONF_HTTP_PROXY_USER))) { - ERROR("%s specified but not %s, line %i\n", + FATAL("%s specified but not %s, line %i\n", CONF_HTTP_PROXY_USER, CONF_HTTP_PROXY_HOST, param->line); - exit(EXIT_FAILURE); } else if ((param = getConfigParam(CONF_HTTP_PROXY_PASSWORD))) { - ERROR("%s specified but not %s, line %i\n", + FATAL("%s specified but not %s, line %i\n", CONF_HTTP_PROXY_PASSWORD, CONF_HTTP_PROXY_HOST, param->line); - exit(EXIT_FAILURE); } param = getConfigParam(CONF_HTTP_BUFFER_SIZE); @@ -132,10 +126,9 @@ void inputStream_initHttp(void) bufferSize = strtol(param->value, &test, 10); if (bufferSize <= 0 || *test != '\0') { - ERROR("\"%s\" specified for %s at line %i is not a " + FATAL("\"%s\" specified for %s at line %i is not a " "positive integer\n", param->value, CONF_HTTP_BUFFER_SIZE, param->line); - exit(EXIT_FAILURE); } bufferSize *= 1024; @@ -150,11 +143,10 @@ void inputStream_initHttp(void) prebufferSize = strtol(param->value, &test, 10); if (prebufferSize <= 0 || *test != '\0') { - ERROR("\"%s\" specified for %s at line %i is not a " + FATAL("\"%s\" specified for %s at line %i is not a " "positive integer\n", param->value, CONF_HTTP_PREBUFFER_SIZE, param->line); - exit(EXIT_FAILURE); } prebufferSize *= 1024; -- cgit v1.2.3