From: Christian Brauner Date: Thu, 25 Feb 2021 09:19:28 +0000 (+0100) Subject: commands: port lxc_cmd_get_clone_flags() to new helpers X-Git-Tag: lxc-5.0.0~267^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4e1a2e8e7ea8e846048b7367225d75b2b83c75e;p=thirdparty%2Flxc.git commands: port lxc_cmd_get_clone_flags() to new helpers Signed-off-by: Christian Brauner --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index ce52fb1a3..3d1fd5ad2 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -757,12 +757,10 @@ static int lxc_cmd_get_cgroup_ctx_callback(int fd, struct lxc_cmd_req *req, int lxc_cmd_get_clone_flags(const char *name, const char *lxcpath) { bool stopped = false; - struct lxc_cmd_rr cmd = { - .req = { - .cmd = LXC_CMD_GET_CLONE_FLAGS, - }, - }; int ret; + struct lxc_cmd_rr cmd; + + lxc_cmd_init(&cmd, LXC_CMD_GET_CLONE_FLAGS); ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); if (ret < 0)