Permalink
Browse files

Thinko pointed out by Andreas Gampe (causing segfaults in top, oops).

  • Loading branch information...
landley committed Feb 8, 2018
1 parent 29fb638 commit 24c63d1dd238ed762297786dbd2912f0bbaf941a
Showing with 1 addition and 1 deletion.
  1. +1 −1 toys/posix/ps.c
@@ -1417,7 +1417,7 @@ static void top_common(
mix.count = 0;
while (old.count || new.count) {
struct carveup *otb = *old.tb, *ntb = *new.tb;
struct carveup *otb = old.tb ? *old.tb : 0, *ntb = new.tb ? *new.tb : 0;
// If we just have old for this process, it exited. Discard it.
if (old.count && (!new.count || *otb->slot < *ntb->slot)) {

0 comments on commit 24c63d1

Please sign in to comment.