diff options
author | Yang Tse <yangsita@gmail.com> | 2008-09-06 05:29:05 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-09-06 05:29:05 +0000 |
commit | 59e378f48fed849e8e41f0bc6a10bf7a1732ae8a (patch) | |
tree | 2443ceace655d5d830c7c4d7c95869c6a0f93c5c /lib/hash.c | |
parent | a622fd90b4c563a4fced20c5b88cb57537e809b0 (diff) | |
download | curl-59e378f48fed849e8e41f0bc6a10bf7a1732ae8a.tar.gz |
remove unnecessary typecasting of malloc()
Diffstat (limited to 'lib/hash.c')
-rw-r--r-- | lib/hash.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/hash.c b/lib/hash.c index 8496803bb..095fa7028 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -67,7 +67,7 @@ Curl_hash_init(struct curl_hash *h, h->size = 0; h->slots = slots; - h->table = (struct curl_llist **) malloc(slots * sizeof(struct curl_llist *)); + h->table = malloc(slots * sizeof(struct curl_llist *)); if(h->table) { for (i = 0; i < slots; ++i) { h->table[i] = Curl_llist_alloc((curl_llist_dtor) hash_element_dtor); @@ -96,7 +96,7 @@ Curl_hash_alloc(int slots, return NULL; /* failure */ } - h = (struct curl_hash *) malloc(sizeof(struct curl_hash)); + h = malloc(sizeof(struct curl_hash)); if(h) { if(Curl_hash_init(h, slots, hfunc, comparator, dtor)) { /* failure */ @@ -113,8 +113,7 @@ Curl_hash_alloc(int slots, static struct curl_hash_element * mk_hash_element(const void *key, size_t key_len, const void *p) { - struct curl_hash_element *he = - (struct curl_hash_element *) malloc(sizeof(struct curl_hash_element)); + struct curl_hash_element *he = malloc(sizeof(struct curl_hash_element)); if(he) { void *dupkey = malloc(key_len); |