projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4f06b7
)
Don't do unneeded sp_acopy() calls
author
Alexander Graf
<agraf@znc.in>
Sun, 8 Feb 2009 15:05:42 +0000
(16:05 +0100)
committer
Alexander Graf
<agraf@znc.in>
Sun, 8 Feb 2009 15:05:42 +0000
(16:05 +0100)
src/top.c
patch
|
blob
|
history
diff --git
a/src/top.c
b/src/top.c
index
fae248b
..
33a0239
100644
(file)
--- a/
src/top.c
+++ b/
src/top.c
@@
-561,7
+561,11
@@
void process_find_top(struct process **cpu, struct process **mem,
}
cur_proc = cur_proc->next;
}
- sp_acopy(spc_head, cpu, MAX_SP);
- sp_acopy(spm_head, mem, MAX_SP);
- sp_acopy(spt_head, time, MAX_SP);
+
+ if (top_cpu)
+ sp_acopy(spc_head, cpu, MAX_SP);
+ if (top_mem)
+ sp_acopy(spm_head, mem, MAX_SP);
+ if (top_time)
+ sp_acopy(spt_head, time, MAX_SP);
}