summaryrefslogtreecommitdiff
path: root/src/hashtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hashtable.c')
-rw-r--r--src/hashtable.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/hashtable.c b/src/hashtable.c
index 84676a9..bf46963 100644
--- a/src/hashtable.c
+++ b/src/hashtable.c
@@ -73,12 +73,7 @@ pair_t hashtable_get_pair(hashtable_t* hashtable, char* key) {
unsigned int ha = hash + i;
unsigned int ia = ha % hashtable->capacity;
pair_t p = hashtable->pairs[ia];
- if (p.key != NULL && strcmp(p.key, key) == 0) {
- return p;
- }
- else if (p.key == NULL) {
- return init_pair(NULL, NULL);
- }
+ return p;
}
return hashtable->pairs[(hash) % hashtable->capacity];
}