-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_mapitem_bykey.c
26 lines (24 loc) · 1.07 KB
/
ft_mapitem_bykey.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_mapitem_bykey.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tle-meur <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/11/23 14:50:15 by tle-meur #+# #+# */
/* Updated: 2015/11/23 14:56:01 by tle-meur ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_map *ft_mapitem_bykey(t_map *map, t_data *key)
{
if (!key)
return (NULL);
while (map)
{
if (ft_dataequ(map->key, key))
return (map);
map = map->next;
}
return (map);
}