summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_nrealloc.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-10 18:13:47 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-10 18:13:47 +0200
commitf165808b1cb551cd86655268b8dfa4fb7dcd5eb7 (patch)
tree3014819ceded1fe93093184d4f2211d4eae065a0 /libft/src/ft_nrealloc.c
parentQuick update (diff)
download42-minishell-f165808b1cb551cd86655268b8dfa4fb7dcd5eb7.tar.gz
42-minishell-f165808b1cb551cd86655268b8dfa4fb7dcd5eb7.tar.bz2
42-minishell-f165808b1cb551cd86655268b8dfa4fb7dcd5eb7.tar.xz
42-minishell-f165808b1cb551cd86655268b8dfa4fb7dcd5eb7.tar.zst
42-minishell-f165808b1cb551cd86655268b8dfa4fb7dcd5eb7.zip
FIX
Diffstat (limited to 'libft/src/ft_nrealloc.c')
-rw-r--r--libft/src/ft_nrealloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libft/src/ft_nrealloc.c b/libft/src/ft_nrealloc.c
index 82975d1..6b42380 100644
--- a/libft/src/ft_nrealloc.c
+++ b/libft/src/ft_nrealloc.c
@@ -21,7 +21,7 @@ void
if (!ptr)
{
- if (!(ptr = malloc(newsize)))
+ if ((ptr = malloc(newsize)) == NULL)
return (NULL);
return (ptr);
}
@@ -30,7 +30,7 @@ void
ft_memdel((void*)&ptr);
return (NULL);
}
- if (!(nptr = malloc(newsize)))
+ if ((nptr = malloc(newsize)) == NULL)
return (ptr);
ft_memcpy(nptr, ptr, oldsize);
ft_memdel((void*)&ptr);