*.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>
This commit is contained in:

committed by
Junio C Hamano

parent
ebf3c04b26
commit
3d97ea479f
@ -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);
|
||||
|
Reference in New Issue
Block a user