diff options
-rw-r--r-- | credential.h | 4 | ||||
-rw-r--r-- | json-writer.h | 5 | ||||
-rw-r--r-- | run-command.h | 5 | ||||
-rw-r--r-- | string-list.h | 4 |
4 files changed, 13 insertions, 5 deletions
diff --git a/credential.h b/credential.h index c0e17e3554..f430e77fea 100644 --- a/credential.h +++ b/credential.h @@ -128,7 +128,9 @@ struct credential { char *path; }; -#define CREDENTIAL_INIT { STRING_LIST_INIT_DUP } +#define CREDENTIAL_INIT { \ + .helpers = STRING_LIST_INIT_DUP, \ +} /* Initialize a credential structure, setting all fields to empty. */ void credential_init(struct credential *); diff --git a/json-writer.h b/json-writer.h index 83906b09c1..209355e0f1 100644 --- a/json-writer.h +++ b/json-writer.h @@ -64,7 +64,10 @@ struct json_writer unsigned int pretty:1; }; -#define JSON_WRITER_INIT { STRBUF_INIT, STRBUF_INIT, 0, 0 } +#define JSON_WRITER_INIT { \ + .json = STRBUF_INIT, \ + .open_stack = STRBUF_INIT, \ +} void jw_init(struct json_writer *jw); void jw_release(struct json_writer *jw); diff --git a/run-command.h b/run-command.h index d08414a92e..62a922d23f 100644 --- a/run-command.h +++ b/run-command.h @@ -141,7 +141,10 @@ struct child_process { void *clean_on_exit_handler_cbdata; }; -#define CHILD_PROCESS_INIT { NULL, STRVEC_INIT, STRVEC_INIT } +#define CHILD_PROCESS_INIT { \ + .args = STRVEC_INIT, \ + .env_array = STRVEC_INIT, \ +} /** * The functions: child_process_init, start_command, finish_command, diff --git a/string-list.h b/string-list.h index 6c5d274126..521b9c0748 100644 --- a/string-list.h +++ b/string-list.h @@ -91,8 +91,8 @@ struct string_list { compare_strings_fn cmp; /* NULL uses strcmp() */ }; -#define STRING_LIST_INIT_NODUP { NULL, 0, 0, 0, NULL } -#define STRING_LIST_INIT_DUP { NULL, 0, 0, 1, NULL } +#define STRING_LIST_INIT_NODUP { 0 } +#define STRING_LIST_INIT_DUP { .strdup_strings = 1 } /* General functions which work with both sorted and unsorted lists. */ |