From: 0x0916 Date: Sun, 16 Apr 2017 02:34:08 +0000 (+0800) Subject: ls: simplify the judgment condition when list active containers X-Git-Tag: lxc-2.1.0~160^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1510%2Fhead;p=thirdparty%2Flxc.git ls: simplify the judgment condition when list active containers Signed-off-by: 0x0916 --- diff --git a/src/lxc/tools/lxc_ls.c b/src/lxc/tools/lxc_ls.c index 363d3d26b..63053b110 100644 --- a/src/lxc/tools/lxc_ls.c +++ b/src/lxc/tools/lxc_ls.c @@ -356,7 +356,7 @@ static int ls_get(struct ls **m, size_t *size, const struct lxc_arguments *args, } /* Do not do more work than is necessary right from the start. */ - if (args->ls_active || (args->ls_active && args->ls_frozen)) + if (args->ls_active || args->ls_frozen) num = list_active_containers(path, &containers, NULL); else num = list_all_containers(path, &containers, NULL);