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:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-07-01 13:51:25 +0300
committerJunio C Hamano <gitster@pobox.com>2021-07-01 22:31:45 +0300
commit3d97ea479fdcb88671105e2f2d04064bab110bd5 (patch)
treea27eca58a56879dd07289bc85e46dddcc76e89cd /json-writer.h
parentebf3c04b262aa27fbb97f8a0156c2347fecafafb (diff)
*.h: move some *_INIT to designated initializers
Move *_INIT macros I'll use in a subsequent commits to designated initializers. This isn't required for those follow-up changes, but since next commits will change things in this area, let's use the modern pattern over the old one while we're at it. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'json-writer.h')
-rw-r--r--json-writer.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/json-writer.h b/json-writer.h
index 83906b09c1..209355e0f1 100644
--- a/json-writer.h
+++ b/json-writer.h
@@ -64,7 +64,10 @@ struct json_writer
unsigned int pretty:1;
};
-#define JSON_WRITER_INIT { STRBUF_INIT, STRBUF_INIT, 0, 0 }
+#define JSON_WRITER_INIT { \
+ .json = STRBUF_INIT, \
+ .open_stack = STRBUF_INIT, \
+}
void jw_init(struct json_writer *jw);
void jw_release(struct json_writer *jw);