From 3d97ea479fdcb88671105e2f2d04064bab110bd5 Mon Sep 17 00:00:00 2001 From: Ævar Arnfjörð Bjarmason Date: Thu, 1 Jul 2021 12:51:25 +0200 Subject: *.h: move some *_INIT to designated initializers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- json-writer.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'json-writer.h') 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); -- cgit v1.3