From 30a2b6f31483d36d2b60dfcd148440192e73cc10 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Thu, 1 Mar 2012 19:05:39 +0400 Subject: [PATCH] dump: Don't pass pid to children parser routine It's in item already. Signed-off-by: Pavel Emelyanov Signed-off-by: Cyrill Gorcunov --- cr-dump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cr-dump.c b/cr-dump.c index ffca7bc08..97172404d 100644 --- a/cr-dump.c +++ b/cr-dump.c @@ -774,7 +774,7 @@ static int parse_threads(struct pstree_item *item) return 0; } -static int parse_children(struct pstree_item *item, pid_t pid) +static int parse_children(struct pstree_item *item) { FILE *file; char *tok; @@ -783,7 +783,7 @@ static int parse_children(struct pstree_item *item, pid_t pid) for (i = 0; i < item->nr_threads; i++) { - file = fopen_proc(pid, "task/%d/children", item->threads[i]); + file = fopen_proc(item->pid, "task/%d/children", item->threads[i]); if (!file) goto err; @@ -909,7 +909,7 @@ static struct pstree_item *collect_task(pid_t pid, pid_t ppid, struct list_head if (ret < 0) goto err_close; - ret = parse_children(item, pid); + ret = parse_children(item); if (ret < 0) goto err_close;