diff options
Diffstat (limited to 'src/listen.c')
-rw-r--r-- | src/listen.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/listen.c b/src/listen.c index df50c2493..479b9acd4 100644 --- a/src/listen.c +++ b/src/listen.c @@ -196,19 +196,16 @@ void listenOnPort(void) { int port = DEFAULT_PORT; ConfigParam *param = getNextConfigParam(CONF_BIND_TO_ADDRESS, NULL); - - { - ConfigParam *portParam = getConfigParam(CONF_PORT); - - if (portParam) { - char *test; - port = strtol(portParam->value, &test, 10); - if (port <= 0 || *test != '\0') { - ERROR("%s \"%s\" specified at line %i is not a " - "positive integer", CONF_PORT, - portParam->value, portParam->line); - exit(EXIT_FAILURE); - } + ConfigParam *portParam = getConfigParam(CONF_PORT); + + if (portParam) { + char *test; + port = strtol(portParam->value, &test, 10); + if (port <= 0 || *test != '\0') { + ERROR("%s \"%s\" specified at line %i is not a " + "positive integer", CONF_PORT, + portParam->value, portParam->line); + exit(EXIT_FAILURE); } } |