Subject: [PATCH 01/27] commit.c: use strchrnul() to scan for one line

From: Brandon Williams <[email-masked]>
Date: Thu, 12 Jan 2017 15:53:28 -0800

From: Junio C Hamano <[email-masked]>

Signed-off-by: Junio C Hamano <[email-masked]>
Signed-off-by: Stefan Beller <[email-masked]>
Signed-off-by: Brandon Williams <[email-masked]>
---
 commit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/commit.c b/commit.c
index 2cf85158b..0c4ee3de4 100644
--- a/commit.c
+++ b/commit.c
@@ -415,8 +415,7 @@ int find_commit_subject(const char *commit_buffer, const char **subject)
 		p++;
 	if (*p) {
 		p = skip_blank_lines(p + 2);
-		for (eol = p; *eol && *eol != '\n'; eol++)
-			; /* do nothing */
+		eol = strchrnul(p, '\n');
 	} else
 		eol = p;
 
-- 
2.11.0.390.gc69c2f50cf-goog