Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'hash-object.c')
-rw-r--r--hash-object.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hash-object.c b/hash-object.c
index a4d127cf78..20937ff94c 100644
--- a/hash-object.c
+++ b/hash-object.c
@@ -34,10 +34,8 @@ static void hash_object(const char *path, const char *type, int write_object,
static void hash_stdin_paths(const char *type, int write_objects)
{
- struct strbuf buf, nbuf;
+ struct strbuf buf = STRBUF_INIT, nbuf = STRBUF_INIT;
- strbuf_init(&buf, 0);
- strbuf_init(&nbuf, 0);
while (strbuf_getline(&buf, stdin, '\n') != EOF) {
if (buf.buf[0] == '"') {
strbuf_reset(&nbuf);