diff options
author | René Scharfe <l.s.r@web.de> | 2016-08-05 22:38:44 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-08-05 15:10:05 -0700 |
commit | 542aa25d9748c381a27074fb08614d4cb4713984 (patch) | |
tree | 2ab5cc63bf15d1eceb26ffd7c52924091b0b6e6a /builtin/submodule--helper.c | |
parent | c6b0597e9ac7277e148e2fd4d7615ac6e0bfb661 (diff) | |
download | git-542aa25d9748c381a27074fb08614d4cb4713984.tar.gz |
use CHILD_PROCESS_INIT to initialize automatic variablesrs/child-process-init
Initialize struct child_process variables already when they're defined.
That's shorter and saves a function call.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/submodule--helper.c')
-rw-r--r-- | builtin/submodule--helper.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 6f6d67a469..e3bd2461f4 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -444,8 +444,7 @@ static int module_name(int argc, const char **argv, const char *prefix) static int clone_submodule(const char *path, const char *gitdir, const char *url, const char *depth, const char *reference, int quiet) { - struct child_process cp; - child_process_init(&cp); + struct child_process cp = CHILD_PROCESS_INIT; argv_array_push(&cp.args, "clone"); argv_array_push(&cp.args, "--no-checkout"); |