зеркало из https://github.com/microsoft/git.git
mktree: drop unused length parameter
The mktree_line() function does not actually look at the "len" parameter it is passed, and assumes the buffer it receives is NUL-terminated. Since the caller always passes a strbuf, this will be true. Let's drop the useless parameter. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
13a178129f
Коммит
be27fb7b28
|
@ -67,7 +67,7 @@ static const char *mktree_usage[] = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void mktree_line(char *buf, size_t len, int nul_term_line, int allow_missing)
|
static void mktree_line(char *buf, int nul_term_line, int allow_missing)
|
||||||
{
|
{
|
||||||
char *ptr, *ntr;
|
char *ptr, *ntr;
|
||||||
const char *p;
|
const char *p;
|
||||||
|
@ -172,7 +172,7 @@ int cmd_mktree(int ac, const char **av, const char *prefix)
|
||||||
break;
|
break;
|
||||||
die("input format error: (blank line only valid in batch mode)");
|
die("input format error: (blank line only valid in batch mode)");
|
||||||
}
|
}
|
||||||
mktree_line(sb.buf, sb.len, nul_term_line, allow_missing);
|
mktree_line(sb.buf, nul_term_line, allow_missing);
|
||||||
}
|
}
|
||||||
if (is_batch_mode && got_eof && used < 1) {
|
if (is_batch_mode && got_eof && used < 1) {
|
||||||
/*
|
/*
|
||||||
|
|
Загрузка…
Ссылка в новой задаче