From 4ede84d4ab98c75ed8655607fe64c205b79ed986 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 29 Sep 2020 19:18:30 +0200 Subject: libft norm in progress --- libft/src/ft_nstr.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libft/src/ft_nstr.c') diff --git a/libft/src/ft_nstr.c b/libft/src/ft_nstr.c index 7b09053..823e1b8 100644 --- a/libft/src/ft_nstr.c +++ b/libft/src/ft_nstr.c @@ -13,15 +13,14 @@ #include #include -char - *ft_nstr(size_t size) +char *ft_nstr(size_t size) { - char *str; - size_t i; + char *str; + size_t i; i = 0; size += 1; - if (!(str = (char*)malloc((size) * sizeof(char)))) + if ((str = (char*)malloc((size) * sizeof(char))) == NULL) return (NULL); while (i < size) { -- cgit v1.2.3