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 <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Felipe Contreras 2014-04-12 15:33:28 -05:00 committed by Junio C Hamano
parent 68773ac915
commit 4a1b59c85f

View file

@ -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;