summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2013-07-18 21:35:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-19 18:15:17 (GMT)
commit1f976bd03f26b70dfbb26b3f9478df09709db966 (patch)
tree06c48ba55592b29a15b0a265ac08dfdefacbd25d /builtin/apply.c
parent3def06e625099907fb44c519611188904b6937a2 (diff)
downloadgit-1f976bd03f26b70dfbb26b3f9478df09709db966.zip
git-1f976bd03f26b70dfbb26b3f9478df09709db966.tar.gz
git-1f976bd03f26b70dfbb26b3f9478df09709db966.tar.bz2
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>
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 0e9b631..ff01ebf 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 == '"') {