summaryrefslogtreecommitdiffstats
path: root/src/hashtable.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-05-21 00:12:57 +0200
committerGravatar Nikias Bassen2023-05-21 00:12:57 +0200
commitf28cf0f1e51c7554d590cbec56abac46b4a44b4e (patch)
tree4e2e2038fe0b780dd9595deecbe887d89a3e3de8 /src/hashtable.c
parentd772fd74d2a52646c34d558220533547725a2298 (diff)
downloadlibplist-f28cf0f1e51c7554d590cbec56abac46b4a44b4e.tar.gz
libplist-f28cf0f1e51c7554d590cbec56abac46b4a44b4e.tar.bz2
Add explicit casts and fix return type mismatches
Diffstat (limited to 'src/hashtable.c')
-rw-r--r--src/hashtable.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/hashtable.c b/src/hashtable.c
index dd6dbfc..86dae82 100644
--- a/src/hashtable.c
+++ b/src/hashtable.c
@@ -47,7 +47,7 @@ void hash_table_destroy(hashtable_t *ht)
ht->free_func(e->value);
}
hashentry_t* old = e;
- e = e->next;
+ e = (hashentry_t*)e->next;
free(old);
}
}
@@ -71,7 +71,7 @@ void hash_table_insert(hashtable_t* ht, void *key, void *value)
e->value = value;
return;
}
- e = e->next;
+ e = (hashentry_t*)e->next;
}
// if we get here, the element is not yet in the list.
@@ -103,7 +103,7 @@ void* hash_table_lookup(hashtable_t* ht, void *key)
if (ht->compare_func(e->key, key)) {
return e->value;
}
- e = e->next;
+ e = (hashentry_t*)e->next;
}
return NULL;
}
@@ -124,7 +124,7 @@ void hash_table_remove(hashtable_t* ht, void *key)
// found element, remove it from the list
hashentry_t* old = e;
if (e == ht->entries[idx0]) {
- ht->entries[idx0] = e->next;
+ ht->entries[idx0] = (hashentry_t*)e->next;
} else {
last->next = e->next;
}
@@ -135,6 +135,6 @@ void hash_table_remove(hashtable_t* ht, void *key)
return;
}
last = e;
- e = e->next;
+ e = (hashentry_t*)e->next;
}
}