From 6e4a34202afca03620b0a8e972f4eef06c58f741 Mon Sep 17 00:00:00 2001 From: delphij Date: Wed, 31 May 2006 00:31:38 +0000 Subject: Explicitly request pre-zeroed memory instead of memset'ing our own. Ok'ed by: davidxu --- lib/libthr/thread/thr_spec.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/libthr/thread/thr_spec.c b/lib/libthr/thread/thr_spec.c index cd4d49f..93be289 100644 --- a/lib/libthr/thread/thr_spec.c +++ b/lib/libthr/thread/thr_spec.c @@ -161,11 +161,7 @@ pthread_key_allocate_data(void) struct pthread_specific_elem *new_data; new_data = (struct pthread_specific_elem *) - malloc(sizeof(struct pthread_specific_elem) * PTHREAD_KEYS_MAX); - if (new_data != NULL) { - memset((void *) new_data, 0, - sizeof(struct pthread_specific_elem) * PTHREAD_KEYS_MAX); - } + calloc(1, sizeof(struct pthread_specific_elem) * PTHREAD_KEYS_MAX); return (new_data); } -- cgit v1.1