summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_nrealloc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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);