summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 16b3b2d)
raw | patch | inline | side by side (parent: 16b3b2d)
author | Brandon Casey <drafnel@gmail.com> | |
Thu, 6 Oct 2011 04:21:33 +0000 (23:21 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 18 Oct 2011 20:28:17 +0000 (13:28 -0700) |
This use of strbuf_grow() is a historical artifact that was once used to
ensure that strbuf.buf was allocated and properly nul-terminated. This
was added before the introduction of the slopbuf in b315c5c0, which
guarantees that strbuf.buf always points to a usable nul-terminated string.
So let's remove it.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ensure that strbuf.buf was allocated and properly nul-terminated. This
was added before the introduction of the slopbuf in b315c5c0, which
guarantees that strbuf.buf always points to a usable nul-terminated string.
So let's remove it.
Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
strbuf.c | patch | blob | history |
diff --git a/strbuf.c b/strbuf.c
index 9ff1b597c995780026a32a92fab78a780d60329a..3ad2cc00160fbf24e1e4904bb37ce44e8c414ce5 100644 (file)
--- a/strbuf.c
+++ b/strbuf.c
{
int ch;
- strbuf_grow(sb, 0);
if (feof(fp))
return EOF;