Commit 45b76a9a authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

dump: Don't shadow the ret code with dump_namespaces

cr_dump_tasks does assign ret = -1 by default but
dump_namespaces does shadow this variable with own
error code so that if any subsequent calls will fail
we will not notice the error.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ea1ec9f6
......@@ -1420,8 +1420,7 @@ int cr_dump_tasks(pid_t pid, const struct cr_options *opts)
goto err;
if (opts->namespaces_flags) {
ret = dump_namespaces(pid, opts->namespaces_flags);
if (ret < 0)
if (dump_namespaces(pid, opts->namespaces_flags) < 0)
goto err;
}
......
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