From: Christian Brauner Date: Thu, 25 Feb 2021 09:16:55 +0000 (+0100) Subject: commands: port lxc_try_cmd() to new helpers X-Git-Tag: lxc-5.0.0~267^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38d14ebda65bb1a8eaa2b0e6a50b811e38d355b6;p=thirdparty%2Flxc.git commands: port lxc_try_cmd() to new helpers Signed-off-by: Christian Brauner --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index 79ecbe427..ba4fc81b9 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -494,12 +494,10 @@ static int lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, bool *stopped, int lxc_try_cmd(const char *name, const char *lxcpath) { bool stopped = false; - struct lxc_cmd_rr cmd = { - .req = { - .cmd = LXC_CMD_GET_INIT_PID, - }, - }; int ret; + struct lxc_cmd_rr cmd; + + lxc_cmd_init(&cmd, LXC_CMD_GET_INIT_PID); ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); if (stopped)