From 4d6e08ac72a89e37dba3ff4257f0bc65257c66b3 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 5 Jul 2018 14:41:38 +0300 Subject: [PATCH] lib-master: ipc-client: Cleanup - avoid extra return in the function Simplifies the following commit. --- src/lib-master/ipc-client.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/lib-master/ipc-client.c b/src/lib-master/ipc-client.c index fa76a1ad7c..28d7217caf 100644 --- a/src/lib-master/ipc-client.c +++ b/src/lib-master/ipc-client.c @@ -178,12 +178,11 @@ void ipc_client_cmd(struct ipc_client *client, const char *cmd, client->to_failed = timeout_add_short(0, ipc_client_cmd_connect_failed, client); } - return; + } else { + iov[0].iov_base = cmd; + iov[0].iov_len = strlen(cmd); + iov[1].iov_base = "\n"; + iov[1].iov_len = 1; + o_stream_nsendv(client->output, iov, N_ELEMENTS(iov)); } - - iov[0].iov_base = cmd; - iov[0].iov_len = strlen(cmd); - iov[1].iov_base = "\n"; - iov[1].iov_len = 1; - o_stream_nsendv(client->output, iov, N_ELEMENTS(iov)); } -- 2.47.3