summaryrefslogtreecommitdiffstats
path: root/Hashtable.c
diff options
context:
space:
mode:
authorMichael McConville <mmcconville ~a~ mykolab ~d~ com>2015-09-16 23:42:36 -0400
committerMichael McConville <mmcconville ~a~ mykolab ~d~ com>2015-09-16 23:42:36 -0400
commit445222e48c380bbb5d209a82f9614187bc751b41 (patch)
tree6d236f6744ed7a61a754385519395a2932d66d3b /Hashtable.c
parent1d805b36b429f5157dd0de6f0b498941aa097941 (diff)
Clean up some needless malloc casts, convert some mallocs to callocs, and fix some style
Diffstat (limited to 'Hashtable.c')
-rw-r--r--Hashtable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Hashtable.c b/Hashtable.c
index 0f61519e..9cb2f932 100644
--- a/Hashtable.c
+++ b/Hashtable.c
@@ -63,7 +63,7 @@ int Hashtable_count(Hashtable* this) {
static HashtableItem* HashtableItem_new(unsigned int key, void* value) {
HashtableItem* this;
- this = (HashtableItem*) malloc(sizeof(HashtableItem));
+ this = malloc(sizeof(HashtableItem));
this->key = key;
this->value = value;
this->next = NULL;
@@ -73,7 +73,7 @@ static HashtableItem* HashtableItem_new(unsigned int key, void* value) {
Hashtable* Hashtable_new(int size, bool owner) {
Hashtable* this;
- this = (Hashtable*) malloc(sizeof(Hashtable));
+ this = malloc(sizeof(Hashtable));
this->items = 0;
this->size = size;
this->buckets = (HashtableItem**) calloc(size, sizeof(HashtableItem*));

© 2014-2024 Faster IT GmbH | imprint | privacy policy