sq_quote_argv: drop maxlen parameter
No caller passes anything but "0" for this parameter, which
requests that the function ignore it completely. In fact, in
all of history there was only one such caller, and it went
away in 7f51f8bc2b
(alias: use run_command api to execute
aliases, 2011-01-07).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
6366dd9000
commit
e35f11c293
4
quote.c
4
quote.c
@ -56,7 +56,7 @@ void sq_quotef(struct strbuf *dst, const char *fmt, ...)
|
||||
strbuf_release(&src);
|
||||
}
|
||||
|
||||
void sq_quote_argv(struct strbuf *dst, const char** argv, size_t maxlen)
|
||||
void sq_quote_argv(struct strbuf *dst, const char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -65,8 +65,6 @@ void sq_quote_argv(struct strbuf *dst, const char** argv, size_t maxlen)
|
||||
for (i = 0; argv[i]; ++i) {
|
||||
strbuf_addch(dst, ' ');
|
||||
sq_quote_buf(dst, argv[i]);
|
||||
if (maxlen && dst->len > maxlen)
|
||||
die("Too many or long arguments");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user