aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2018-02-09 18:53:40 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-02-09 18:53:40 +0000
commit8aa1c6e7f55dadd0388a3b4d6d0e94678058a12c (patch)
treed47a2efaa474f0b08b25cbaf83694d4497c11cf1
parentffcd05077978d9812513d1170280325d7b9d861e (diff)
parentd21ae1a3cc7c2b8dc74fdacc23034de5ad4de54e (diff)
downloadtoybox-8aa1c6e7f55dadd0388a3b4d6d0e94678058a12c.tar.gz
Merge remote-tracking branch 'toybox/master' into HEAD am: 4b13881492
am: d21ae1a3cc Change-Id: I3c441f8e25e2b3ae0ba3fa3b91df5ce9d620cff2
-rw-r--r--toys/posix/ps.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/posix/ps.c b/toys/posix/ps.c
index 8ee68ad6..e94902b3 100644
--- a/toys/posix/ps.c
+++ b/toys/posix/ps.c
@@ -1417,7 +1417,8 @@ static void top_common(
mix.count = 0;
while (old.count || new.count) {
- struct carveup *otb = old.tb ? *old.tb : 0, *ntb = new.tb ? *new.tb : 0;
+ struct carveup *otb = old.count ? *old.tb : 0,
+ *ntb = new.count ? *new.tb : 0;
// If we just have old for this process, it exited. Discard it.
if (old.count && (!new.count || *otb->slot < *ntb->slot)) {