change
This commit is contained in:
parent
80b5560b38
commit
8dced91fb3
3 changed files with 7 additions and 6 deletions
6
libft/src/env/ft_getenv.c
vendored
6
libft/src/env/ft_getenv.c
vendored
|
|
@ -3,10 +3,10 @@
|
||||||
/* ::: :::::::: */
|
/* ::: :::::::: */
|
||||||
/* ft_getenv.c :+: :+: :+: */
|
/* ft_getenv.c :+: :+: :+: */
|
||||||
/* +:+ +:+ +:+ */
|
/* +:+ +:+ +:+ */
|
||||||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/10 14:30:00 by jhalford #+# #+# */
|
/* Created: 2016/12/01 12:15:45 by jhalford #+# #+# */
|
||||||
/* Updated: 2016/11/16 11:24:52 by jhalford ### ########.fr */
|
/* Updated: 2016/12/01 12:29:25 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/03 18:04:13 by jhalford #+# #+# */
|
/* Created: 2016/11/03 18:04:13 by jhalford #+# #+# */
|
||||||
/* Updated: 2016/11/03 18:04:13 by jhalford ### ########.fr */
|
/* Updated: 2016/12/01 12:29:27 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -28,5 +28,6 @@ char **ft_sstrdup(char **list)
|
||||||
cpy[i++] = ft_strdup(*list);
|
cpy[i++] = ft_strdup(*list);
|
||||||
list++;
|
list++;
|
||||||
}
|
}
|
||||||
|
cpy[i] = NULL;
|
||||||
return (cpy);
|
return (cpy);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: jhalford <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2016/11/03 14:58:01 by jhalford #+# #+# */
|
/* Created: 2016/11/03 14:58:01 by jhalford #+# #+# */
|
||||||
/* Updated: 2016/11/03 14:58:02 by jhalford ### ########.fr */
|
/* Updated: 2016/12/01 12:27:28 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -21,7 +21,7 @@ char *ft_strdup(const char *s1)
|
||||||
i = 0;
|
i = 0;
|
||||||
size = ft_strlen(s1);
|
size = ft_strlen(s1);
|
||||||
dup = (char*)malloc(sizeof(*dup) * (size + 1));
|
dup = (char*)malloc(sizeof(*dup) * (size + 1));
|
||||||
while (s1[i] != '\0')
|
while (s1[i])
|
||||||
{
|
{
|
||||||
dup[i] = s1[i];
|
dup[i] = s1[i];
|
||||||
i++;
|
i++;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue