From d3180279322c7450a47decf8833de47f444ca93f Mon Sep 17 00:00:00 2001 From: René Scharfe 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 --- pager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pager.c') diff --git a/pager.c b/pager.c index 8b5cbc56e..d0e4bc822 100644 --- a/pager.c +++ b/pager.c @@ -18,7 +18,7 @@ struct pager_config { */ static const char *pager_argv[] = { NULL, NULL }; -static struct child_process pager_process; +static struct child_process pager_process = CHILD_PROCESS_INIT; static void wait_for_pager(void) { -- cgit v1.2.3