aboutsummaryrefslogtreecommitdiff
path: root/strvec.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-09-27 15:02:13 -0700
committerJunio C Hamano <gitster@pobox.com>2021-09-27 15:02:13 -0700
commita30321b9eaede5a1d639936d212e2d0fc8d414c8 (patch)
tree56806f1b45ec4b31eaa6dc182d42798703d16d8e /strvec.h
parentddb1055343948e0d0bc81f8d20245f1ada6430a0 (diff)
parent538835d2ac151abbe90058becfc0dc061d33302c (diff)
downloadgit-a30321b9eaede5a1d639936d212e2d0fc8d414c8.tar.xz
Merge branch 'ab/designated-initializers' into ab/designated-initializers-more
* 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 'strvec.h')
-rw-r--r--strvec.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/strvec.h b/strvec.h
index 6b3cbd6758..9f55c8766b 100644
--- a/strvec.h
+++ b/strvec.h
@@ -33,7 +33,9 @@ struct strvec {
size_t alloc;
};
-#define STRVEC_INIT { empty_strvec, 0, 0 }
+#define STRVEC_INIT { \
+ .v = empty_strvec, \
+}
/**
* Initialize an array. This is no different than assigning from