pull resolved

This commit is contained in:
Jack Halford 2017-02-10 13:39:34 +01:00
commit a144239a56
2 changed files with 7 additions and 3 deletions

View file

@ -3,10 +3,10 @@
/* ::: :::::::: */
/* ft_memrealloc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: wescande <marvin@42.fr> +#+ +:+ +#+ */
/* By: wescande <wescande@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/11/05 13:44:36 by wescande #+# #+# */
/* Updated: 2017/02/08 13:54:33 by wescande ### ########.fr */
/* Updated: 2017/02/10 12:13:23 by gwojda ### ########.fr */
/* */
/* ************************************************************************** */
@ -25,6 +25,6 @@ void *ft_memrealloc(void *ptr, size_t old_s, size_t new_s)
}
n_ptr = ft_memalloc(new_s);
ft_memcpy(n_ptr, ptr, old_s);
ft_memdel(ptr);
ft_memdel(&ptr);
return (n_ptr);
}

View file

@ -45,5 +45,9 @@ int data_init(void)
data->jobc.first_job = NULL;
data->jobc.current_id = 1;
if ((term_name = ft_getenv(data->env, "TERM")) == NULL)
return (-1);
if (tgetent(NULL, term_name) != 1)
return (-1);
return (0);
}