Subject: Re: [PATCH 1/2] blame: factor out get_next_line()

From: Jonathan Nieder <[email-masked]>
Date: Fri, 13 Jun 2014 14:05:42 -0700

René Scharfe wrote:

> Signed-off-by: Rene Scharfe <[email-masked]>
> ---
>  builtin/blame.c | 28 ++++++++++------------------
>  1 file changed, 10 insertions(+), 18 deletions(-)

Reviewed-by: Jonathan Nieder <[email-masked]>

[...]
> +	for (p = get_next_line(buf, end); p; p = get_next_line(p, end))
> +		num++;

This could say something like

	for (p = buf; p = get_next_line(buf, end); ) {
		num++;

or

	p = buf;
	while ((p = memchr(p, '\n', end - p))) {
		p++;
		num++;
	}

but what you have seems more readable.

Thanks,
Jonathan