pkt-line: rename packet_write() to packet_write_fmt()
packet_write() should be called packet_write_fmt() because it is a printf-like function that takes a format string as first parameter. packet_write_fmt() should be used for text strings only. Arbitrary binary data should use a new packet_write() function that is introduced in a subsequent patch. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
ac2fbaa674
commit
81c634e94f
@ -118,7 +118,7 @@ static void format_packet(struct strbuf *out, const char *fmt, va_list args)
|
||||
packet_trace(out->buf + orig_len + 4, n - 4, 1);
|
||||
}
|
||||
|
||||
void packet_write(int fd, const char *fmt, ...)
|
||||
void packet_write_fmt(int fd, const char *fmt, ...)
|
||||
{
|
||||
static struct strbuf buf = STRBUF_INIT;
|
||||
va_list args;
|
||||
|
Reference in New Issue
Block a user