23 lines
1 KiB
C
23 lines
1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lst_pop.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2017/10/07 17:53:30 by jhalford #+# #+# */
|
|
/* Updated: 2017/10/07 17:53:31 by jhalford ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
t_list *ft_lst_pop(t_list **lst)
|
|
{
|
|
t_list *top;
|
|
|
|
top = *lst;
|
|
if (lst && *lst)
|
|
*lst = (*lst)->next;
|
|
return (top);
|
|
}
|