Listen: eliminate local variable
This commit is contained in:
parent
e609c88334
commit
d884272ba8
@ -106,7 +106,6 @@ listen_global_init(EventLoop &loop, Partition &partition, Error &error)
|
||||
int port = config_get_positive(CONF_PORT, DEFAULT_PORT);
|
||||
const struct config_param *param =
|
||||
config_get_next_param(CONF_BIND_TO_ADDRESS, nullptr);
|
||||
bool success;
|
||||
|
||||
listen_socket = new ClientListener(loop, partition);
|
||||
|
||||
@ -138,8 +137,7 @@ listen_global_init(EventLoop &loop, Partition &partition, Error &error)
|
||||
/* no "bind_to_address" configured, bind the
|
||||
configured port on all interfaces */
|
||||
|
||||
success = listen_socket->AddPort(port, error);
|
||||
if (!success) {
|
||||
if (!listen_socket->AddPort(port, error)) {
|
||||
delete listen_socket;
|
||||
error.FormatPrefix("Failed to listen on *:%d: ", port);
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user