From: Felipe Contreras Date: Sat, 12 Apr 2014 20:33:28 +0000 (-0500) Subject: transport-helper: remove barely used xchgline() X-Git-Tag: v2.0.0-rc1~2^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4a1b59c85f99b4ed046ae8066e7dea1d8621a986;p=thirdparty%2Fgit.git transport-helper: remove barely used xchgline() It's only used once, we can just call the two functions inside directly. Signed-off-by: Felipe Contreras Signed-off-by: Junio C Hamano --- diff --git a/transport-helper.c b/transport-helper.c index 86e1679c1e..892107c734 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -71,12 +71,6 @@ static int recvline(struct helper_data *helper, struct strbuf *buffer) return recvline_fh(helper->out, buffer, helper->name); } -static void xchgline(struct helper_data *helper, struct strbuf *buffer) -{ - sendline(helper, buffer); - recvline(helper, buffer); -} - static void write_constant(int fd, const char *str) { if (debug) @@ -307,7 +301,8 @@ static int set_helper_option(struct transport *transport, quote_c_style(value, &buf, NULL, 0); strbuf_addch(&buf, '\n'); - xchgline(data, &buf); + sendline(data, &buf); + recvline(data, &buf); if (!strcmp(buf.buf, "ok")) ret = 0;