42-archive/libft/src/lst/ft_lstpop.c
2016-11-04 11:17:02 +01:00

23 lines
1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lstpop.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/04 11:09:56 by jhalford #+# #+# */
/* Updated: 2016/11/04 11:09:56 by jhalford ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
t_list *ft_lstpop(t_list **lst)
{
t_list *top;
top = *lst;
if (*lst)
*lst = (*lst)->next;
return (top);
}