Removing a useless block.

git-svn-id: https://svn.musicpd.org/mpd/trunk@5460 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
J. Alexander Treuman 2007-02-28 12:34:36 +00:00
parent afa3ccc3b1
commit befd2776bc

View File

@ -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);
{ if (portParam) {
ConfigParam *portParam = getConfigParam(CONF_PORT); char *test;
port = strtol(portParam->value, &test, 10);
if (portParam) { if (port <= 0 || *test != '\0') {
char *test; ERROR("%s \"%s\" specified at line %i is not a "
port = strtol(portParam->value, &test, 10); "positive integer", CONF_PORT,
if (port <= 0 || *test != '\0') { portParam->value, portParam->line);
ERROR("%s \"%s\" specified at line %i is not a " exit(EXIT_FAILURE);
"positive integer", CONF_PORT,
portParam->value, portParam->line);
exit(EXIT_FAILURE);
}
} }
} }