Merge branch 'ab/designated-initializers'

Code clean-up.

* ab/designated-initializers:
  cbtree.h: define cb_init() in terms of CBTREE_INIT
  *.h: move some *_INIT to designated initializers
  *.h _INIT macros: don't specify fields equal to 0
  *.[ch] *_INIT macros: use { 0 } for a "zero out" idiom
  submodule-config.h: remove unused SUBMODULE_INIT macro
This commit is contained in:
Junio C Hamano
2021-10-11 10:21:48 -07:00
29 changed files with 68 additions and 54 deletions

View File

@ -1318,9 +1318,11 @@ struct submodule_parallel_fetch {
struct strbuf submodules_with_errors;
};
#define SPF_INIT {0, STRVEC_INIT, NULL, NULL, 0, 0, 0, 0, \
STRING_LIST_INIT_DUP, \
NULL, 0, 0, STRBUF_INIT}
#define SPF_INIT { \
.args = STRVEC_INIT, \
.changed_submodule_names = STRING_LIST_INIT_DUP, \
.submodules_with_errors = STRBUF_INIT, \
}
static int get_fetch_recurse_config(const struct submodule *submodule,
struct submodule_parallel_fetch *spf)