Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cache.h2
-rw-r--r--simple-ipc.h6
-rw-r--r--strbuf.h2
-rw-r--r--strvec.h2
-rw-r--r--submodule.h2
-rw-r--r--t/helper/test-run-command.c2
-rw-r--r--trace.h2
7 files changed, 7 insertions, 11 deletions
diff --git a/cache.h b/cache.h
index f6295f3b04..25c6b0b120 100644
--- a/cache.h
+++ b/cache.h
@@ -1668,7 +1668,7 @@ struct cache_def {
int track_flags;
int prefix_len_stat_func;
};
-#define CACHE_DEF_INIT { STRBUF_INIT, 0, 0, 0 }
+#define CACHE_DEF_INIT { STRBUF_INIT }
static inline void cache_def_clear(struct cache_def *cache)
{
strbuf_release(&cache->path);
diff --git a/simple-ipc.h b/simple-ipc.h
index 2c48a5ee00..08b2908d5f 100644
--- a/simple-ipc.h
+++ b/simple-ipc.h
@@ -65,11 +65,7 @@ struct ipc_client_connect_options {
unsigned int uds_disallow_chdir:1;
};
-#define IPC_CLIENT_CONNECT_OPTIONS_INIT { \
- .wait_if_busy = 0, \
- .wait_if_not_found = 0, \
- .uds_disallow_chdir = 0, \
-}
+#define IPC_CLIENT_CONNECT_OPTIONS_INIT { 0 }
/*
* Determine if a server is listening on this named pipe or socket using
diff --git a/strbuf.h b/strbuf.h
index 5b1113abf8..3b36bbc49f 100644
--- a/strbuf.h
+++ b/strbuf.h
@@ -70,7 +70,7 @@ struct strbuf {
};
extern char strbuf_slopbuf[];
-#define STRBUF_INIT { .alloc = 0, .len = 0, .buf = strbuf_slopbuf }
+#define STRBUF_INIT { .buf = strbuf_slopbuf }
/*
* Predeclare this here, since cache.h includes this file before it defines the
diff --git a/strvec.h b/strvec.h
index 6b3cbd6758..a10aad5f64 100644
--- a/strvec.h
+++ b/strvec.h
@@ -33,7 +33,7 @@ struct strvec {
size_t alloc;
};
-#define STRVEC_INIT { empty_strvec, 0, 0 }
+#define STRVEC_INIT { empty_strvec }
/**
* Initialize an array. This is no different than assigning from
diff --git a/submodule.h b/submodule.h
index 4578e501b8..35d18c7868 100644
--- a/submodule.h
+++ b/submodule.h
@@ -37,7 +37,7 @@ struct submodule_update_strategy {
enum submodule_update_type type;
const char *command;
};
-#define SUBMODULE_UPDATE_STRATEGY_INIT {SM_UPDATE_UNSPECIFIED, NULL}
+#define SUBMODULE_UPDATE_STRATEGY_INIT {SM_UPDATE_UNSPECIFIED}
int is_gitmodules_unmerged(struct index_state *istate);
int is_writing_gitmodules_ok(void);
diff --git a/t/helper/test-run-command.c b/t/helper/test-run-command.c
index 14c57365e7..50bb98b7e0 100644
--- a/t/helper/test-run-command.c
+++ b/t/helper/test-run-command.c
@@ -61,7 +61,7 @@ struct testsuite {
int quiet, immediate, verbose, verbose_log, trace, write_junit_xml;
};
#define TESTSUITE_INIT \
- { STRING_LIST_INIT_DUP, STRING_LIST_INIT_DUP, 0, 0, 0, 0, 0, 0, 0 }
+ { STRING_LIST_INIT_DUP, STRING_LIST_INIT_DUP }
static int next_test(struct child_process *cp, struct strbuf *err, void *cb,
void **task_cb)
diff --git a/trace.h b/trace.h
index 0dbbad0e41..74f62919c5 100644
--- a/trace.h
+++ b/trace.h
@@ -89,7 +89,7 @@ struct trace_key {
extern struct trace_key trace_default_key;
-#define TRACE_KEY_INIT(name) { "GIT_TRACE_" #name, 0, 0, 0 }
+#define TRACE_KEY_INIT(name) { "GIT_TRACE_" #name }
extern struct trace_key trace_perf_key;
extern struct trace_key trace_setup_key;