Commit befd2776 authored by J. Alexander Treuman's avatar J. Alexander Treuman

Removing a useless block.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5460 09075e82-0dd4-0310-85a5-a0d7c8717e4f
parent afa3ccc3
...@@ -196,19 +196,16 @@ void listenOnPort(void) ...@@ -196,19 +196,16 @@ void listenOnPort(void)
{ {
int port = DEFAULT_PORT; int port = DEFAULT_PORT;
ConfigParam *param = getNextConfigParam(CONF_BIND_TO_ADDRESS, NULL); ConfigParam *param = getNextConfigParam(CONF_BIND_TO_ADDRESS, NULL);
ConfigParam *portParam = getConfigParam(CONF_PORT);
{
ConfigParam *portParam = getConfigParam(CONF_PORT); if (portParam) {
char *test;
if (portParam) { port = strtol(portParam->value, &test, 10);
char *test; if (port <= 0 || *test != '\0') {
port = strtol(portParam->value, &test, 10); ERROR("%s \"%s\" specified at line %i is not a "
if (port <= 0 || *test != '\0') { "positive integer", CONF_PORT,
ERROR("%s \"%s\" specified at line %i is not a " portParam->value, portParam->line);
"positive integer", CONF_PORT, exit(EXIT_FAILURE);
portParam->value, portParam->line);
exit(EXIT_FAILURE);
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment