diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-07-01 13:51:25 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-01 22:31:45 +0300 |
commit | 3d97ea479fdcb88671105e2f2d04064bab110bd5 (patch) | |
tree | a27eca58a56879dd07289bc85e46dddcc76e89cd /string-list.h | |
parent | ebf3c04b262aa27fbb97f8a0156c2347fecafafb (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 'string-list.h')
-rw-r--r-- | string-list.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/string-list.h b/string-list.h index 6c5d274126..521b9c0748 100644 --- a/string-list.h +++ b/string-list.h @@ -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. */ |