summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2006-05-31 00:31:38 +0000
committerXin LI <delphij@FreeBSD.org>2006-05-31 00:31:38 +0000
commit631574e7dc078227e5e679d0b59c2be4d760189c (patch)
tree9271e1610cefaeffe39ff330feda4dc0c9ab92fe
parentf1c313bff28ce705619e86324c79757b60db91bc (diff)
Notes
-rw-r--r--lib/libthr/thread/thr_spec.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libthr/thread/thr_spec.c b/lib/libthr/thread/thr_spec.c
index cd4d49f90ca61..93be2893219ae 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);
}