[CRIU] [PATCH 2/6] collect: Clean children collect code variables usage

Pavel Emelyanov xemul at parallels.com
Mon Nov 10 05:04:54 PST 2014


Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
 cr-dump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cr-dump.c b/cr-dump.c
index f56006d..1215ddd 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -800,7 +800,6 @@ static int get_children(struct pstree_item *item)
 {
 	pid_t *ch;
 	int ret, i, nr_children, nr_inprogress;
-	struct pstree_item *c;
 
 	ret = parse_children(item->pid.real, &ch, &nr_children);
 	if (ret < 0)
@@ -808,6 +807,7 @@ static int get_children(struct pstree_item *item)
 
 	nr_inprogress = 0;
 	for (i = 0; i < nr_children; i++) {
+		struct pstree_item *c;
 		pid_t pid = ch[i];
 
 		/* Is it already frozen? */
@@ -838,7 +838,7 @@ static int get_children(struct pstree_item *item)
 			continue;
 		}
 
-		c->pid.real = ch[i];
+		c->pid.real = pid;
 		c->parent = item;
 		c->state = ret;
 		list_add_tail(&c->sibling, &item->children);
-- 
1.8.4.2




More information about the CRIU mailing list