From: Stefan Beller Date: Thu, 18 Jul 2013 21:35:27 +0000 (+0200) Subject: apply.c::find_name_traditional(): do not initialize len to the line's length X-Git-Tag: v1.8.3.4~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f976bd03f26b70dfbb26b3f9478df09709db966;p=git 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: Stefan Beller Signed-off-by: Junio C Hamano --- diff --git a/builtin/apply.c b/builtin/apply.c index 0e9b631db6..ff01ebff3d 100644 --- a/builtin/apply.c +++ b/builtin/apply.c @@ -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 == '"') {