]> git.ipfire.org Git - thirdparty/git.git/blobdiff - hash-object.c
Replace calls to strbuf_init(&foo, 0) with STRBUF_INIT initializer
[thirdparty/git.git] / hash-object.c
index a4d127cf78013ca43339c5493b7f7ef90b2145a8..20937ff94c1ce6ab7984d7b6b1903307e303eb60 100644 (file)
@@ -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);