projects
/
monky
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7b9329
)
better zero out allocated memory
author
Phil Sutter
<phil@nwl.cc>
Mon, 14 Sep 2009 00:07:45 +0000
(
02:07
+0200)
committer
Phil Sutter
<phil@nwl.cc>
Tue, 15 Sep 2009 21:16:39 +0000
(23:16 +0200)
src/top.c
patch
|
blob
|
history
diff --git
a/src/top.c
b/src/top.c
index
ba0602e
..
ade98ec
100644
(file)
--- a/
src/top.c
+++ b/
src/top.c
@@
-522,8
+522,7
@@
static struct sorted_process *malloc_sp(struct process *proc)
{
struct sorted_process *sp;
sp = malloc(sizeof(struct sorted_process));
- sp->greater = NULL;
- sp->less = NULL;
+ memset(sp, 0, sizeof(struct sorted_process));
sp->proc = proc;
return sp;
}