]> git.proxmox.com Git - mirror_lxc.git/commitdiff
ls: simplify the judgment condition when list active containers
author0x0916 <w@laoqinren.net>
Sun, 16 Apr 2017 02:34:08 +0000 (10:34 +0800)
committer0x0916 <w@laoqinren.net>
Sun, 16 Apr 2017 10:36:57 +0000 (18:36 +0800)
Signed-off-by: 0x0916 <w@laoqinren.net>
src/lxc/tools/lxc_ls.c

index 363d3d26bb35195ff8091069fa742599330216e5..63053b110eb5ad5687af6314537c5cae9cea0eac 100644 (file)
@@ -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);