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 --- column.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'column.c') diff --git a/column.c b/column.c index ca878bcea7..76b615db5f 100644 --- a/column.c +++ b/column.c @@ -367,7 +367,7 @@ int parseopt_column_callback(const struct option *opt, } static int fd_out = -1; -static struct child_process column_process; +static struct child_process column_process = CHILD_PROCESS_INIT; int run_column_filter(int colopts, const struct column_options *opts) { -- cgit v1.2.3