From 3d97ea479fdcb88671105e2f2d04064bab110bd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= 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 --- string-list.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'string-list.h') 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. */ -- cgit v1.2.3