summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_realloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libft/src/ft_realloc.c')
-rw-r--r--libft/src/ft_realloc.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/libft/src/ft_realloc.c b/libft/src/ft_realloc.c
deleted file mode 100644
index 34b43c3..0000000
--- a/libft/src/ft_realloc.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <libft.h>
-#include <stddef.h>
-#include <stdlib.h>
-
-void
- *ft_realloc(void *ptr, size_t size)
-{
- void *nptr;
-
- if (!ptr)
- {
- if (!(ptr = malloc(size)))
- return (NULL);
- return (ptr);
- }
- else if (!size)
- {
- free(ptr);
- return (NULL);
- }
- if (!(nptr = malloc(size)))
- return (ptr);
- ft_memcpy(nptr, ptr, ft_strlen(ptr));
- free(ptr);
- return (nptr);
-}