Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
credential: handle invalid arguments earlier
[gitweb.git]
/
commit.c
diff --git
a/commit.c
b/commit.c
index fab8269731b4764351c7b68543337ded138d4aab..73c78c2b80c1a21e83f1942347a76fb76511a0d3 100644
(file)
--- 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;