Skip to content

Commit

Permalink
transport-helper: remove barely used xchgline()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Contreras authored and Junio C Hamano committed Apr 14, 2014
1 parent 68773ac commit 4a1b59c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions transport-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 4a1b59c

Please sign in to comment.