From d3180279322c7450a47decf8833de47f444ca93f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Tue, 19 Aug 2014 21:09:35 +0200 Subject: run-command: introduce CHILD_PROCESS_INIT Most struct child_process variables are cleared using memset first after declaration. Provide a macro, CHILD_PROCESS_INIT, that can be used to initialize them statically instead. That's shorter, doesn't require a function call and is slightly more readable (especially given that we already have STRBUF_INIT, ARGV_ARRAY_INIT etc.). Helped-by: Johannes Sixt Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- imap-send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'imap-send.c') diff --git a/imap-send.c b/imap-send.c index 524fbabc96..d8fb10f660 100644 --- a/imap-send.c +++ b/imap-send.c @@ -962,7 +962,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc) if (srvc->tunnel) { const char *argv[] = { srvc->tunnel, NULL }; - struct child_process tunnel = {NULL}; + struct child_process tunnel = CHILD_PROCESS_INIT; imap_info("Starting tunnel '%s'... ", srvc->tunnel); -- cgit v1.2.3