mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-03-15 19:36:50 +01:00
26 lines
1.0 KiB
C
26 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_lstadd_back.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/11/11 16:37:42 by adjoly #+# #+# */
|
|
/* Updated: 2024/02/04 14:56:37 by adjoly ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "../libft.h"
|
|
|
|
void ft_lstadd_back(t_list **lst, t_list *new)
|
|
{
|
|
if (!lst)
|
|
return ;
|
|
if (!*lst)
|
|
{
|
|
(*lst) = new;
|
|
return ;
|
|
}
|
|
ft_lstlast((*lst))->next = new;
|
|
}
|