Skip to content

Commit

Permalink
lib-master: ipc-client: Cleanup - avoid extra return in the function
Browse files Browse the repository at this point in the history
Simplifies the following commit.
  • Loading branch information
sirainen committed Jan 25, 2019
1 parent b7ecba9 commit 8687df5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/lib-master/ipc-client.c
Expand Up @@ -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));
}

0 comments on commit 8687df5

Please sign in to comment.