From: Christian Brauner Date: Thu, 25 Feb 2021 08:23:27 +0000 (+0100) Subject: commands: use IN_SET() in lxc_cmd() X-Git-Tag: lxc-5.0.0~267^2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0437eac56910160adbf2f722711c0577c28ed5dc;p=thirdparty%2Flxc.git commands: use IN_SET() in lxc_cmd() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/commands.c b/src/lxc/commands.c index 9685cfa2e..f541a2142 100644 --- a/src/lxc/commands.c +++ b/src/lxc/commands.c @@ -471,7 +471,7 @@ static int lxc_cmd(const char *name, struct lxc_cmd_rr *cmd, int *stopped, client_fd = lxc_cmd_send(name, cmd, lxcpath, hashed_sock_name); if (client_fd < 0) { - if (errno == ECONNREFUSED || errno == EPIPE) + if (IN_SET(errno, ECONNREFUSED, EPIPE)) *stopped = 1; return log_trace_errno(-1, errno, "Command \"%s\" failed to connect command socket",