aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-19 23:50:47 +0100
committerMax Kellermann <max@duempel.org>2014-02-19 23:50:47 +0100
commitd884272ba878321017045eef0e3da441b45198e2 (patch)
treee04c49a69d66d73fb7b68779e5e99e954d258d3d
parente609c8833498e43b024b8742ec5b7a99e2be0760 (diff)
downloadmpd-d884272ba878321017045eef0e3da441b45198e2.tar.gz
mpd-d884272ba878321017045eef0e3da441b45198e2.tar.xz
mpd-d884272ba878321017045eef0e3da441b45198e2.zip
Listen: eliminate local variable
-rw-r--r--src/Listen.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Listen.cxx b/src/Listen.cxx
index b967ee3b8..e8efc79ce 100644
--- a/src/Listen.cxx
+++ b/src/Listen.cxx
@@ -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;