提交 1f976bd0 编写于 作者: S Stefan Beller 提交者: Junio C Hamano

apply.c::find_name_traditional(): do not initialize len to the line's length

The variable len is set to

    len = strchrnul(line, '\n') - line;

unconditionally 9 lines later, hence we can remove the call to strlen.
Signed-off-by: NStefan Beller <stefanbeller@googlemail.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 3def06e6
......@@ -722,7 +722,7 @@ static char *find_name(const char *line, char *def, int p_value, int terminate)
static char *find_name_traditional(const char *line, char *def, int p_value)
{
size_t len = strlen(line);
size_t len;
size_t date_len;
if (*line == '"') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册