summaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
authorBrandon Casey <drafnel@gmail.com>2011-10-05 23:21:33 -0500
committerJunio C Hamano <gitster@pobox.com>2011-10-18 13:28:17 -0700
commit1844f8d591340bb43e4990c96afd0aba424adf48 (patch)
treeff5298b7c2368c78e25cf31001f97c4a16aef4d5 /strbuf.c
parent16b3b2d969e88be50cb0eb9af3c56fcfcda38756 (diff)
downloadgit-1844f8d591340bb43e4990c96afd0aba424adf48.tar.gz
strbuf.c: remove unnecessary strbuf_grow() from strbuf_getwholeline()
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>
Diffstat (limited to 'strbuf.c')
-rw-r--r--strbuf.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/strbuf.c b/strbuf.c
index 9ff1b597c9..3ad2cc0016 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -357,7 +357,6 @@ int strbuf_getwholeline(struct strbuf *sb, FILE *fp, int term)
{
int ch;
- strbuf_grow(sb, 0);
if (feof(fp))
return EOF;