Commit 1a35a746 by Christian Brauner Committed by GitHub

Merge pull request #1510 from 0x0916/fix-ls

ls: simplify the judgment condition when list active containers
parents b4f185c7 045e2de3
...@@ -356,7 +356,7 @@ static int ls_get(struct ls **m, size_t *size, const struct lxc_arguments *args, ...@@ -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. */ /* 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); num = list_active_containers(path, &containers, NULL);
else else
num = list_all_containers(path, &containers, NULL); num = list_all_containers(path, &containers, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment