From 8687df53b320c577a6907ed5ef6dc6553f58853f 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 368cfd2e4d..09d8b51bba 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)); }