From: Christian Brauner Date: Thu, 25 Feb 2021 09:20:55 +0000 (+0100) Subject: commands: port lxc_cmd_stop() to new helpers X-Git-Tag: lxc-5.0.0~267^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbdd56c120a4e426038655e9ef4b73ebeb05befe;p=thirdparty%2Flxc.git commands: port lxc_cmd_stop() to new helpers Signed-off-by: Christian Brauner --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index 762db6381..6e9111875 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -1029,12 +1029,10 @@ static int lxc_cmd_get_state_callback(int fd, struct lxc_cmd_req *req, int lxc_cmd_stop(const char *name, const char *lxcpath) { bool stopped = false; - struct lxc_cmd_rr cmd = { - .req = { - .cmd = LXC_CMD_STOP, - }, - }; int ret; + struct lxc_cmd_rr cmd; + + lxc_cmd_init(&cmd, LXC_CMD_STOP); ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); if (ret < 0) {