fillit/libft/ft_lst_at.c

21 lines
1,010 B
C
Raw Normal View History

2016-12-26 18:48:33 +02:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lst_at.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: gtertysh <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/06 17:17:21 by gtertysh #+# #+# */
/* Updated: 2016/12/06 19:49:09 by gtertysh ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lst_at(t_list *l, unsigned int at)
{
while (at-- && l)
l = l->next;
return (l);
}