diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-05-15 15:21:36 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-16 13:55:02 -0700 |
commit | 37678bee95adaf4250f2b6d99c6cbaad6f87586c (patch) | |
tree | b4a4fbe54c33a3efdbfc23a693f164d163fc4507 | |
parent | d92347f59fefb95a2d9240c007a44f408c216fa7 (diff) | |
download | git-37678bee95adaf4250f2b6d99c6cbaad6f87586c.tar.gz |
commit.c: use strchrnul() to scan for one line
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | commit.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -415,8 +415,7 @@ int find_commit_subject(const char *commit_buffer, const char **subject) p++; if (*p) { p += 2; - for (eol = p; *eol && *eol != '\n'; eol++) - ; /* do nothing */ + eol = strchrnul(p, '\n'); } else eol = p; |