Commit 0b654822 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

pstree: fix error handling

pstree.c:273:3: warning: Value stored to 'ret' is never read
                ret = 0;
                ^     ~
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 9f994b81
...@@ -270,7 +270,6 @@ static int read_pstree_image(void) ...@@ -270,7 +270,6 @@ static int read_pstree_image(void)
if (!pi->threads) if (!pi->threads)
break; break;
ret = 0;
for (i = 0; i < e->n_threads; i++) for (i = 0; i < e->n_threads; i++)
pi->threads[i].virt = e->threads[i]; pi->threads[i].virt = e->threads[i];
...@@ -283,7 +282,7 @@ static int read_pstree_image(void) ...@@ -283,7 +282,7 @@ static int read_pstree_image(void)
if (fd < 0) { if (fd < 0) {
if (errno == ENOENT) if (errno == ENOENT)
continue; continue;
return -1; goto err;
} }
ret = pb_read_one(fd, &pi->ids, PB_IDS); ret = pb_read_one(fd, &pi->ids, PB_IDS);
close(fd); close(fd);
......
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