chiark / gitweb /
bootchart: Remove unneeded check for NULL
[elogind.git] / src / bootchart / store.c
index f8c97c2324020d88e337ea19d0f99d7ffab9f0a3..b6ba11356192eacd205965cd1edf67fa4927bb93 100644 (file)
@@ -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;