summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-10-11 10:21:48 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-10-11 10:21:48 -0700
commit404c4a54624c3e0ea9066809344a6269c16de69f (patch)
tree53e4675199a1cfafdaea4f3304564446375812ed /cache.h
parentMerge branch 'ab/sanitize-leak-ci' (diff)
parentcbtree.h: define cb_init() in terms of CBTREE_INIT (diff)
downloadtgif-404c4a54624c3e0ea9066809344a6269c16de69f.tar.xz
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
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/cache.h b/cache.h
index 1e2e6ee8cb..d092820c94 100644
--- a/cache.h
+++ b/cache.h
@@ -1617,7 +1617,9 @@ struct cache_def {
int track_flags;
int prefix_len_stat_func;
};
-#define CACHE_DEF_INIT { STRBUF_INIT, 0, 0, 0 }
+#define CACHE_DEF_INIT { \
+ .path = STRBUF_INIT, \
+}
static inline void cache_def_clear(struct cache_def *cache)
{
strbuf_release(&cache->path);