remove obsolete malloc check
This commit is contained in:
parent
7b1951bf85
commit
0b250580f2
@ -1,12 +1,12 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* :::::::: */
|
||||
/* prompt.c :+: :+: */
|
||||
/* +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ */
|
||||
/* +#+ */
|
||||
/* ::: :::::::: */
|
||||
/* prompt.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: qmennen <qmennen@student.codam.nl> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/04 16:13:08 by whaffman #+# #+# */
|
||||
/* Updated: 2025/02/25 16:43:27 by whaffman ######## odam.nl */
|
||||
/* Updated: 2025/02/25 18:41:56 by qmennen ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -101,11 +101,6 @@ char *ft_prompt(t_minishell *minishell)
|
||||
if (user == NULL)
|
||||
return (free(cwd), NULL);
|
||||
prompt = ft_strjoin_safe(minishell, user, cwd);
|
||||
if (prompt == NULL)
|
||||
{
|
||||
perror("malloc");
|
||||
return (free(cwd), free(user), NULL);
|
||||
}
|
||||
free_safe(minishell, (void **)&user);
|
||||
free_safe(minishell, (void **)&cwd);
|
||||
rl_on_new_line();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user