This commit is contained in:
lclerel- lclerel-
2026-03-19 19:28:29 +01:00
parent 28fb6502a2
commit 3e313fb203
7 changed files with 14 additions and 14 deletions

View File

@@ -6,7 +6,7 @@
/* By: lclerel- <lclerel-@learner.42.tech> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/03/16 14:01:43 by lclerel- #+# #+# */
/* Updated: 2026/03/19 11:37:45 by lclerel- ### ########.fr */
/* Updated: 2026/03/19 19:19:38 by lclerel- ### ########.fr */
/* */
/* ************************************************************************** */
@@ -21,10 +21,10 @@ char *ft_strdup(char *src)
i = 0;
len = 0;
if (src == NULL)
return (NULL);
while (src[len])
{
len++;
}
dst = malloc(sizeof(char) * (len + 1));
if (dst == NULL)
{
@@ -39,8 +39,8 @@ char *ft_strdup(char *src)
return (dst);
}
/*
void ft_putchar(char chara)
/*void ft_putchar(char chara)
{
write(1, &chara, 1);
}
@@ -61,7 +61,7 @@ int main(void)
{
char *dest;
dest = ft_strdup("TestTest");
dest = ft_strdup(NULL);
if (dest == NULL)
{