OSDN Git Service

The "show parent command path" commit changed the criteria for active nodes,
authorRob Landley <rob@landley.net>
Tue, 24 May 2016 21:17:55 +0000 (16:17 -0500)
committerRob Landley <rob@landley.net>
Tue, 24 May 2016 21:17:55 +0000 (16:17 -0500)
and the collate logic wasn't updated. (Oops.)

toys/posix/ps.c

index 4f8d75a..b204962 100644 (file)
@@ -1075,8 +1075,8 @@ static struct carveup **collate_leaves(struct carveup **tb, struct dirtree *dt)
   while (dt) {
     struct dirtree *next = dt->next;
 
+    if (dt->extra) *(tb++) = (void *)dt->extra;
     if (dt->child) tb = collate_leaves(tb, dt->child);
-    else *(tb++) = (void *)dt->extra;
     free(dt);
     dt = next;
   }