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>
Felipe Contreras committed
Apr 12, 2014 at 15:33 UTC
4a1b59c85f99b4ed046ae8066e7dea1d8621a986
1 file changed
+2
-7
transport-helper.c
+2
-7
@@ -71,12 +71,6 @@ static int recvline(struct helper_data *helper, struct strbuf *buffer)
71
return recvline_fh(helper->out, buffer, helper->name);
72
}
73
74
-static void xchgline(struct helper_data *helper, struct strbuf *buffer)
75
-{
76
- sendline(helper, buffer);
77
- recvline(helper, buffer);
78
-}
79
-
74
static void write_constant(int fd, const char *str)
75
{
76
if (debug)
@@ -307,7 +301,8 @@ static int set_helper_option(struct transport *transport,
301
quote_c_style(value, &buf, NULL, 0);
302
strbuf_addch(&buf, '\n');
303
310
- xchgline(data, &buf);
304
+ sendline(data, &buf);
305
+ recvline(data, &buf);
306
307
if (!strcmp(buf.buf, "ok"))
308
ret = 0;