diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-31 10:44:30 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-02-02 22:12:42 +0100 |
| commit | ac0559db82bfef3b7ca3d976b1d7700ed2c1c1fc (patch) | |
| tree | 214d344c714bdf5b53d651dbd11fec9e0db283cb /src/lst/ft_lstbsearch.c | |
| parent | 9db52bc5ef545a3fa9973002e9a28a2ece68d029 (diff) | |
| download | libft-ac0559db82bfef3b7ca3d976b1d7700ed2c1c1fc.tar.gz libft-ac0559db82bfef3b7ca3d976b1d7700ed2c1c1fc.tar.bz2 libft-ac0559db82bfef3b7ca3d976b1d7700ed2c1c1fc.zip | |
hash table unit testing, norming
Diffstat (limited to 'src/lst/ft_lstbsearch.c')
| -rw-r--r-- | src/lst/ft_lstbsearch.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lst/ft_lstbsearch.c b/src/lst/ft_lstbsearch.c index 3d5dbde..25a7b4c 100644 --- a/src/lst/ft_lstbsearch.c +++ b/src/lst/ft_lstbsearch.c @@ -6,7 +6,7 @@ /* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/01/30 09:17:51 by cacharle #+# #+# */ -/* Updated: 2020/01/30 09:17:53 by cacharle ### ########.fr */ +/* Updated: 2020/01/31 10:42:22 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -26,7 +26,7 @@ static t_ftlst *st_lstmiddle(t_ftlst *lst, t_ftlst *last) { fast = fast->next; if (fast == NULL) - break; + break ; slow = slow->next; fast = fast->next; } @@ -34,7 +34,7 @@ static t_ftlst *st_lstmiddle(t_ftlst *lst, t_ftlst *last) } static t_ftlst *st_lstbsearch_rec(t_ftlst *lst, t_ftlst *last, - t_ftbool (*equal)(void *ref, void *content), void *ref) + t_ftbool (*equal)(void *ref, void *content), void *ref) { t_ftlst *mid; t_ftlst *left; @@ -50,7 +50,7 @@ static t_ftlst *st_lstbsearch_rec(t_ftlst *lst, t_ftlst *last, return (st_lstbsearch_rec(mid, NULL, equal, ref)); } -t_ftlst *ft_lstbsearch(t_ftlst *lst, +t_ftlst *ft_lstbsearch(t_ftlst *lst, t_ftbool (*equal)(void *ref, void *content), void *ref) { return (st_lstbsearch_rec(lst, NULL, equal, ref)); |
