summaryrefslogtreecommitdiff
path: root/builtin/config.c
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-10-01 12:27:33 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-10-01 14:22:51 -0700
commit73ee449bbf2918e29d26361e57f35a24f224e3be (patch)
tree0884f8efad2f065ebd08bbcf44170dea6d92460d /builtin/config.c
parentbuiltin/blame.c: refactor commit_info_init() to COMMIT_INFO_INIT macro (diff)
downloadtgif-73ee449bbf2918e29d26361e57f35a24f224e3be.tar.xz
urlmatch.[ch]: add and use URLMATCH_CONFIG_INIT
Change the initialization pattern of "struct urlmatch_config" to use an *_INIT macro and designated initializers. Right now there's no other "struct" member of "struct urlmatch_config" which would require its own *_INIT, but it's good practice not to assume that. Let's also change this to a designated initializer 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 'builtin/config.c')
-rw-r--r--builtin/config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/config.c b/builtin/config.c
index 865fddd6ce..542d8d02b2 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -575,7 +575,7 @@ static int get_urlmatch(const char *var, const char *url)
int ret;
char *section_tail;
struct string_list_item *item;
- struct urlmatch_config config = { STRING_LIST_INIT_DUP };
+ struct urlmatch_config config = URLMATCH_CONFIG_INIT;
struct string_list values = STRING_LIST_INIT_DUP;
config.collect_fn = urlmatch_collect_fn;