X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=hash-object.c;h=20937ff94c1ce6ab7984d7b6b1903307e303eb60;hb=6331adb9c4ec36c70dc3ecc6eb46b7dddb36952d;hp=a4d127cf78013ca43339c5493b7f7ef90b2145a8;hpb=5630feaf370e15c01ef8a6aa469bfd656c1d1cd7;p=git.git diff --git a/hash-object.c b/hash-object.c index a4d127cf7..20937ff94 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);