From 38d14ebda65bb1a8eaa2b0e6a50b811e38d355b6 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 25 Feb 2021 10:16:55 +0100 Subject: [PATCH] commands: port lxc_try_cmd() to new helpers Signed-off-by: Christian Brauner --- src/lxc/commands.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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) -- 2.47.2