OSDN Git Service
(root)
/
android-x86
/
external-toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
29fb638
)
Thinko pointed out by Andreas Gampe (causing segfaults in top, oops).
author
Rob Landley
<rob@landley.net>
Thu, 8 Feb 2018 14:57:10 +0000
(08:57 -0600)
committer
Rob Landley
<rob@landley.net>
Thu, 8 Feb 2018 14:57:10 +0000
(08:57 -0600)
toys/posix/ps.c
patch
|
blob
|
history
diff --git
a/toys/posix/ps.c
b/toys/posix/ps.c
index
fd9b54b
..
8ee68ad
100644
(file)
--- a/
toys/posix/ps.c
+++ b/
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)) {