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

committed by
Junio C Hamano

parent
4eb2bfdc92
commit
73ee449bbf
@ -105,7 +105,7 @@ static int match_partial_url(const char *url, void *cb)
|
||||
static void credential_apply_config(struct credential *c)
|
||||
{
|
||||
char *normalized_url;
|
||||
struct urlmatch_config config = { STRING_LIST_INIT_DUP };
|
||||
struct urlmatch_config config = URLMATCH_CONFIG_INIT;
|
||||
struct strbuf url = STRBUF_INIT;
|
||||
|
||||
if (!c->host)
|
||||
|
Reference in New Issue
Block a user