On Sat, Feb 25, 2017 at 08:21:52PM +0100, René Scharfe wrote: > Search for a space character only within the current line in > read_commit_extra_header_lines() instead of searching in the whole > buffer (and possibly beyond, if it's not NUL-terminated) and then > discarding any results after the end of the current line. > [...] > - eof = strchr(line, ' '); > - if (next <= eof) > + eof = memchr(line, ' ', next - line); > + if (!eof) > eof = next; Nice. More efficient, and I think the intent is more clear. -Peff