From 039b95776979c74f7d02719800f9d742338e815b Mon Sep 17 00:00:00 2001 From: paul Date: Sun, 31 Oct 2004 16:43:17 +0000 Subject: 2004-10-31 Paul Jakma * thread.c: Use XCALLOC and sizeof the type, not the pointer. --- lib/thread.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/thread.c') 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; -- cgit v1.2.1