*.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:
Ævar Arnfjörð Bjarmason
2021-07-01 12:51:25 +02:00
committed by Junio C Hamano
parent ebf3c04b26
commit 3d97ea479f
4 changed files with 13 additions and 5 deletions

View File

@ -91,8 +91,8 @@ struct string_list {
compare_strings_fn cmp; /* NULL uses strcmp() */
};
#define STRING_LIST_INIT_NODUP { NULL, 0, 0, 0, NULL }
#define STRING_LIST_INIT_DUP { NULL, 0, 0, 1, NULL }
#define STRING_LIST_INIT_NODUP { 0 }
#define STRING_LIST_INIT_DUP { .strdup_strings = 1 }
/* General functions which work with both sorted and unsorted lists. */