From: Timo Sirainen Date: Thu, 5 Jul 2018 11:41:38 +0000 (+0300) Subject: lib-master: ipc-client: Cleanup - avoid extra return in the function X-Git-Tag: 2.2.36.1~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=247e4fcea96e1bdb23c1b59ef0739ef3cc74a0ff;p=thirdparty%2Fdovecot%2Fcore.git lib-master: ipc-client: Cleanup - avoid extra return in the function Simplifies the following commit. --- 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)); }