mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
pstree: fix error handling
pstree.c:273:3: warning: Value stored to 'ret' is never read ret = 0; ^ ~ Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
9f994b8179
commit
0b6548229a
3
pstree.c
3
pstree.c
@@ -270,7 +270,6 @@ static int read_pstree_image(void)
|
||||
if (!pi->threads)
|
||||
break;
|
||||
|
||||
ret = 0;
|
||||
for (i = 0; i < e->n_threads; i++)
|
||||
pi->threads[i].virt = e->threads[i];
|
||||
|
||||
@@ -283,7 +282,7 @@ static int read_pstree_image(void)
|
||||
if (fd < 0) {
|
||||
if (errno == ENOENT)
|
||||
continue;
|
||||
return -1;
|
||||
goto err;
|
||||
}
|
||||
ret = pb_read_one(fd, &pi->ids, PB_IDS);
|
||||
close(fd);
|
||||
|
Reference in New Issue
Block a user