diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-19 22:27:11 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-19 22:27:11 +0200 |
commit | 62afe606a355581c5b48cca361478c43fb6ae4cf (patch) | |
tree | a278fe2fdf44c296892616554743b9d380ff7afa /libft/src/ft_realloc.c | |
parent | Added joe-sh_history to gitignore (diff) | |
download | 42-minishell-62afe606a355581c5b48cca361478c43fb6ae4cf.tar.gz 42-minishell-62afe606a355581c5b48cca361478c43fb6ae4cf.tar.bz2 42-minishell-62afe606a355581c5b48cca361478c43fb6ae4cf.tar.xz 42-minishell-62afe606a355581c5b48cca361478c43fb6ae4cf.tar.zst 42-minishell-62afe606a355581c5b48cca361478c43fb6ae4cf.zip |
Well well well that wasn't too bad, now remake everything
Diffstat (limited to 'libft/src/ft_realloc.c')
-rw-r--r-- | libft/src/ft_realloc.c | 26 |
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); -} |