aboutsummaryrefslogtreecommitdiff
path: root/src/ht/ft_htget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ht/ft_htget.c')
-rw-r--r--src/ht/ft_htget.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ht/ft_htget.c b/src/ht/ft_htget.c
index 6a9d785..c5e7234 100644
--- a/src/ht/ft_htget.c
+++ b/src/ht/ft_htget.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/01/30 08:33:21 by cacharle #+# #+# */
-/* Updated: 2020/02/16 02:23:23 by cacharle ### ########.fr */
+/* Updated: 2020/02/17 03:06:07 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -18,11 +18,9 @@ void *ft_htget(t_ftht *ht, char *key)
t_ftht_digest digest;
- return (NULL); // lstbsearch breaking
if (ht == NULL || key == NULL)
return (NULL);
digest = ft_hthash(ht, key);
- return (((t_ftht_content*)ft_lstbsearch(ht->entries[digest],
- ft_inter_htkey_equal,
- key)->content)->value);
+ return (((t_ftht_content*)ft_lstlfind(ht->entries[digest],
+ ft_inter_htkey_cmp, key)->content)->value);
}