X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbootchart%2Fstore.c;h=b6ba11356192eacd205965cd1edf67fa4927bb93;hb=aa28aefe61c5406c5cb631f3e82457b6d1bcc967;hp=f8c97c2324020d88e337ea19d0f99d7ffab9f0a3;hpb=087a30417dd9eca855ef1e22a20093a5674bd915;p=elogind.git diff --git a/src/bootchart/store.c b/src/bootchart/store.c index f8c97c232..b6ba11356 100644 --- a/src/bootchart/store.c +++ b/src/bootchart/store.c @@ -275,7 +275,7 @@ schedstat_next: pscount++; /* mark our first sample */ - ps->first = ps->sample; + ps->first = ps->last = ps->sample; ps->sample->runtime = atoll(rt); ps->sample->waittime = atoll(wt); @@ -345,7 +345,7 @@ schedstat_next: while ((parent->next_ps && parent->pid != ps->ppid)) parent = parent->next_ps; - if ((!parent) || (parent->pid != ps->ppid)) { + if (parent->pid != ps->ppid) { /* orphan */ ps->ppid = 1; parent = ps_first->next_ps;