diff options
author | paul <paul> | 2004-10-31 16:43:17 +0000 |
---|---|---|
committer | paul <paul> | 2004-10-31 16:43:17 +0000 |
commit | 9b5b5dc703aac79b73f41bed7f8d7e60b81c0b5a (patch) | |
tree | 4ba8799a7ddfd1fe19b00892c49ad51ca67fa13a /lib/thread.c | |
parent | 22b891cf8c824591beb9f6f4d6dd62ec61817a05 (diff) | |
download | quagga-9b5b5dc703aac79b73f41bed7f8d7e60b81c0b5a.tar.bz2 quagga-9b5b5dc703aac79b73f41bed7f8d7e60b81c0b5a.tar.xz |
2004-10-31 Paul Jakma <paul@dishone.st>
* thread.c: Use XCALLOC and sizeof the type, not the pointer.
Diffstat (limited to 'lib/thread.c')
-rw-r--r-- | lib/thread.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/thread.c b/lib/thread.c index 94fdf1f5..09d6ff73 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -104,8 +104,7 @@ static void* cpu_record_hash_alloc (struct cpu_thread_history *a) { struct cpu_thread_history *new; - new = XMALLOC( MTYPE_THREAD_STATS, sizeof *new); - memset(new, 0, sizeof (struct cpu_thread_history)); + new = XCALLOC (MTYPE_THREAD_STATS, sizeof (struct cpu_thread_history)); new->func = a->func; new->funcname = XSTRDUP(MTYPE_THREAD_FUNCNAME, a->funcname); return new; |