summaryrefslogtreecommitdiff
path: root/object-file.c
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2022-03-17 18:27:17 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-03-17 10:36:42 -0700
commit501036492b74ad2f3bf9af70fc90056245b60525 (patch)
tree380c71802de0d37e35d5ca8e8984b39818a5a222 /object-file.c
parentrefs: use designated initializers for "struct ref_iterator_vtable" (diff)
downloadtgif-501036492b74ad2f3bf9af70fc90056245b60525.tar.xz
misc *.c: use designated initializers for struct assignments
Change a few miscellaneous non-designated initializer assignments to use designated initializers. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object-file.c')
-rw-r--r--object-file.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/object-file.c b/object-file.c
index bdc5cbdd38..f0a75b3ff1 100644
--- a/object-file.c
+++ b/object-file.c
@@ -274,10 +274,11 @@ static struct cached_object {
static int cached_object_nr, cached_object_alloc;
static struct cached_object empty_tree = {
- { EMPTY_TREE_SHA1_BIN_LITERAL },
- OBJ_TREE,
- "",
- 0
+ .oid = {
+ .hash = EMPTY_TREE_SHA1_BIN_LITERAL,
+ },
+ .type = OBJ_TREE,
+ .buf = "",
};
static struct cached_object *find_cached_object(const struct object_id *oid)