diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-10-01 10:27:33 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-01 21:22:51 (GMT) |
commit | 73ee449bbf2918e29d26361e57f35a24f224e3be (patch) | |
tree | 0884f8efad2f065ebd08bbcf44170dea6d92460d /urlmatch.h | |
parent | 4eb2bfdc92139f04619be21a354c025747e7ceea (diff) | |
download | git-73ee449bbf2918e29d26361e57f35a24f224e3be.zip git-73ee449bbf2918e29d26361e57f35a24f224e3be.tar.gz git-73ee449bbf2918e29d26361e57f35a24f224e3be.tar.bz2 |
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 'urlmatch.h')
-rw-r--r-- | urlmatch.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -66,6 +66,10 @@ struct urlmatch_config { int (*fallback_match_fn)(const char *url, void *cb); }; +#define URLMATCH_CONFIG_INIT { \ + .vars = STRING_LIST_INIT_DUP, \ +} + int urlmatch_config_entry(const char *var, const char *value, void *cb); #endif /* URL_MATCH_H */ |