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
@ -128,9 +128,9 @@ static void send_git_request(int stdin_fd, const char *serv, const char *repo,
|
||||
const char *vhost)
|
||||
{
|
||||
if (!vhost)
|
||||
packet_write(stdin_fd, "%s %s%c", serv, repo, 0);
|
||||
packet_write_fmt(stdin_fd, "%s %s%c", serv, repo, 0);
|
||||
else
|
||||
packet_write(stdin_fd, "%s %s%chost=%s%c", serv, repo, 0,
|
||||
packet_write_fmt(stdin_fd, "%s %s%chost=%s%c", serv, repo, 0,
|
||||
vhost, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user