diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-29 18:54:03 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-29 18:54:03 +0200 |
commit | dc7255fdb45587ddd90db87e3c3b971ebd8edef0 (patch) | |
tree | ffda6630195437ea771065d6d42f5fc84b35eea5 /libft/src/ft_calloc.c | |
parent | Atoi update (diff) | |
download | 42-minishell-dc7255fdb45587ddd90db87e3c3b971ebd8edef0.tar.gz 42-minishell-dc7255fdb45587ddd90db87e3c3b971ebd8edef0.tar.bz2 42-minishell-dc7255fdb45587ddd90db87e3c3b971ebd8edef0.tar.xz 42-minishell-dc7255fdb45587ddd90db87e3c3b971ebd8edef0.tar.zst 42-minishell-dc7255fdb45587ddd90db87e3c3b971ebd8edef0.zip |
Some updates
Diffstat (limited to 'libft/src/ft_calloc.c')
-rw-r--r-- | libft/src/ft_calloc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libft/src/ft_calloc.c b/libft/src/ft_calloc.c index 88c5457..e8f81f7 100644 --- a/libft/src/ft_calloc.c +++ b/libft/src/ft_calloc.c @@ -14,15 +14,16 @@ #include <stddef.h> #include <stdlib.h> -void - *ft_calloc(size_t count, size_t size) +void *ft_calloc(size_t count, size_t size) { void *ptr; ptr = 0; ptr = malloc(count * size); - if (!ptr) + if (ptr == NULL) + { return (NULL); + } ft_bzero(ptr, count * size); return (ptr); } |