fix: close fd

This commit is contained in:
Camille Chauvet
2023-02-21 22:38:00 +01:00
parent eb4a8ed663
commit 916f2c3c50
4 changed files with 9 additions and 14 deletions

Binary file not shown.

View File

@ -6,11 +6,7 @@
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/17 13:09:08 by erey-bet #+# #+# */
<<<<<<< HEAD
/* Updated: 2023/02/21 21:45:38 by cchauvet ### ########.fr */
=======
/* Updated: 2023/02/21 22:09:55 by erey-bet ### ########.fr */
>>>>>>> 1fdc51a668e616de94c33d5b3b1e9cb51182916d
/* Updated: 2023/02/21 22:15:27 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
@ -49,7 +45,6 @@ int check_argument(char *str, int *check, int i)
return (i);
}
char *conca(char **strs)
{
int len;
@ -60,7 +55,7 @@ char *conca(char **strs)
i = -1;
len = 0;
while (strs[++i] != NULL)
len += strlen(strs[i]) + 2;
len += ft_strlen(strs[i]) + 2;
str = (char *) ft_calloc(len + 1, sizeof(char));
if (str == NULL)
return NULL;
@ -74,7 +69,6 @@ char *conca(char **strs)
return (str);
}
int echo(int fd, char **strs)
{
int check;