ft_free_null()
+ refactoring shell_loop()
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/08 09:25:35 by lperrey #+# #+# */
|
||||
/* Updated: 2021/11/27 12:58:20 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/11/30 13:11:48 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -211,3 +211,9 @@ int ft_reti_perror_io(int ret, char *err_str, char *io_file)
|
||||
perror(io_file);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
void ft_free_null(void *ptr)
|
||||
{
|
||||
free(*(char**)ptr);
|
||||
*(char**)ptr = NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user