diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-03-06 21:25:32 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-03-06 21:25:32 -0800 |
commit | 20d34c07ea4d44e362e5b8f0924a9c63a73a5e43 (patch) | |
tree | 578d4400d6abea1b187c734896bc6c0bc4be8228 /builtin | |
parent | 283e4e7cd35ae61d86e6a3a61cfea283adc09ba5 (diff) | |
parent | c829f5f85767079e3f7bf0c9fd36f916fb179fba (diff) | |
download | git-20d34c07ea4d44e362e5b8f0924a9c63a73a5e43.tar.gz |
Merge branch 'ab/c99-designated-initializers'
Use designated initializers we started using in mid 2017 in more
parts of the codebase that are relatively quiescent.
* ab/c99-designated-initializers:
fast-import.c: use designated initializers for "partial" struct assignments
refspec.c: use designated initializers for "struct refspec_item"
convert.c: use designated initializers for "struct stream_filter*"
userdiff.c: use designated initializers for "struct userdiff_driver"
archive-*.c: use designated initializers for "struct archiver"
object-file: use designated initializers for "struct git_hash_algo"
trace2: use designated initializers for "struct tr2_dst"
trace2: use designated initializers for "struct tr2_tgt"
imap-send.c: use designated initializers for "struct imap_server_conf"
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fast-import.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/builtin/fast-import.c b/builtin/fast-import.c index 28f2b9cc91..b7105fcad9 100644 --- a/builtin/fast-import.c +++ b/builtin/fast-import.c @@ -177,8 +177,9 @@ static int global_argc; static const char **global_argv; /* Memory pools */ -static struct mem_pool fi_mem_pool = {NULL, 2*1024*1024 - - sizeof(struct mp_block), 0 }; +static struct mem_pool fi_mem_pool = { + .block_alloc = 2*1024*1024 - sizeof(struct mp_block), +}; /* Atom management */ static unsigned int atom_table_sz = 4451; @@ -206,7 +207,9 @@ static int import_marks_file_done; static int relative_marks_paths; /* Our last blob */ -static struct last_object last_blob = { STRBUF_INIT, 0, 0, 0 }; +static struct last_object last_blob = { + .data = STRBUF_INIT, + }; /* Tree management */ static unsigned int tree_entry_alloc = 1000; @@ -232,7 +235,10 @@ static struct tag *last_tag; static whenspec_type whenspec = WHENSPEC_RAW; static struct strbuf command_buf = STRBUF_INIT; static int unread_command_buf; -static struct recent_command cmd_hist = {&cmd_hist, &cmd_hist, NULL}; +static struct recent_command cmd_hist = { + .prev = &cmd_hist, + .next = &cmd_hist, +}; static struct recent_command *cmd_tail = &cmd_hist; static struct recent_command *rc_free; static unsigned int cmd_save = 100; |