diff options
Diffstat (limited to 'libft/src/ft_nstr.c')
-rw-r--r-- | libft/src/ft_nstr.c | 9 |
1 files changed, 4 insertions, 5 deletions
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 <stdlib.h> #include <stddef.h> -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) { |