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>
This commit is contained in:
parent
e2f8acb6a0
commit
501036492b
2
attr.c
2
attr.c
@ -80,7 +80,7 @@ static int attr_hash_entry_cmp(const void *unused_cmp_data,
|
|||||||
* Access to this dictionary must be surrounded with a mutex.
|
* Access to this dictionary must be surrounded with a mutex.
|
||||||
*/
|
*/
|
||||||
static struct attr_hashmap g_attr_hashmap = {
|
static struct attr_hashmap g_attr_hashmap = {
|
||||||
HASHMAP_INIT(attr_hash_entry_cmp, NULL)
|
.map = HASHMAP_INIT(attr_hash_entry_cmp, NULL),
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -113,6 +113,7 @@ static struct notes_merge_pair *find_notes_merge_pair_pos(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct object_id uninitialized = {
|
static struct object_id uninitialized = {
|
||||||
|
.hash =
|
||||||
"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" \
|
"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" \
|
||||||
"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"
|
"\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"
|
||||||
};
|
};
|
||||||
|
@ -274,10 +274,11 @@ static struct cached_object {
|
|||||||
static int cached_object_nr, cached_object_alloc;
|
static int cached_object_nr, cached_object_alloc;
|
||||||
|
|
||||||
static struct cached_object empty_tree = {
|
static struct cached_object empty_tree = {
|
||||||
{ EMPTY_TREE_SHA1_BIN_LITERAL },
|
.oid = {
|
||||||
OBJ_TREE,
|
.hash = EMPTY_TREE_SHA1_BIN_LITERAL,
|
||||||
"",
|
},
|
||||||
0
|
.type = OBJ_TREE,
|
||||||
|
.buf = "",
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct cached_object *find_cached_object(const struct object_id *oid)
|
static struct cached_object *find_cached_object(const struct object_id *oid)
|
||||||
|
Loading…
Reference in New Issue
Block a user