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 <stefanbeller@googlemail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefan Beller committed
Jul 18, 2013 at 23:35 UTC
1f976bd03f26b70dfbb26b3f9478df09709db966
1 file changed
+1
-1
builtin/apply.c
+1
-1
@@ -722,7 +722,7 @@ static char *find_name(const char *line, char *def, int p_value, int terminate)
722
723
static char *find_name_traditional(const char *line, char *def, int p_value)
724
{
725
- size_t len = strlen(line);
725
+ size_t len;
726
size_t date_len;
727
728
if (*line == '"') {