From: Jonathan Nieder <jrnieder@gmail.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>, David Kastrup <dak@gnu.org>
Subject: Re: [PATCH 1/2] blame: factor out get_next_line()
Date: Fri, 13 Jun 2014 14:05:42 -0700 [thread overview]
Message-ID: <20140613210542.GK8557@google.com> (raw)
In-Reply-To: <539B569F.1090800@web.de>
René Scharfe wrote:
> Signed-off-by: Rene Scharfe <l.s.r@web.de>
> ---
> builtin/blame.c | 28 ++++++++++------------------
> 1 file changed, 10 insertions(+), 18 deletions(-)
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
[...]
> + 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
prev parent reply other threads:[~2014-06-13 21:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 19:53 [PATCH 1/2] blame: factor out get_next_line() René Scharfe
2014-06-13 19:54 ` [PATCH 2/2] blame: simplify prepare_lines() René Scharfe
2014-06-13 21:13 ` Jonathan Nieder
2014-06-13 21:33 ` René Scharfe
2014-06-13 21:46 ` Jonathan Nieder
2014-06-13 21:05 ` Jonathan Nieder [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140613210542.GK8557@google.com \
--to=jrnieder@gmail.com \
--cc=dak@gnu.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).