summaryrefslogtreecommitdiff
path: root/simple-ipc.h
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2021-09-27 12:54:26 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-27 21:47:59 (GMT)
commit608cfd31cf8179ff971ddaf64675b47187e768c7 (patch)
treebb2fb7b3359b24a4a07367eba728bad88499bf83 /simple-ipc.h
parent9865b6e6a4ca1e895fd473c827cf1822f3bd8249 (diff)
downloadgit-608cfd31cf8179ff971ddaf64675b47187e768c7.zip
git-608cfd31cf8179ff971ddaf64675b47187e768c7.tar.gz
git-608cfd31cf8179ff971ddaf64675b47187e768c7.tar.bz2
*.h _INIT macros: don't specify fields equal to 0
Change the initialization of "struct strbuf" changed in cbc0f81d96f (strbuf: use designated initializers in STRBUF_INIT, 2017-07-10) to omit specifying "alloc" and "len", as we do with other "alloc" and "len" (or "nr") in similar structs. Let's likewise omit the explicit initialization of all fields in the "struct ipc_client_connect_option" struct added in 59c7b88198a (simple-ipc: add win32 implementation, 2021-03-15). Do the same for a few other initializers, e.g. STRVEC_INIT and CACHE_DEF_INIT. Finally, start incrementally changing the same pattern in "t/helper/test-run-command.c". This change was part of an earlier on-list version[1] of c90be786da9 (test-tool run-command: fix flip-flop init pattern, 2021-09-11). 1. https://lore.kernel.org/git/patch-1.1-0aa4523ab6e-20210909T130849Z-avarab@gmail.com/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'simple-ipc.h')
-rw-r--r--simple-ipc.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/simple-ipc.h b/simple-ipc.h
index 2c48a5e..08b2908 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