2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

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: Cyrill Gorcunov <gorcunov@openvz.org>
Acked-by: Andrew Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2012-03-13 18:11:00 +04:00
committed by Pavel Emelyanov
parent ea1ec9f619
commit 45b76a9a9a

View File

@@ -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;
}