From 462e664d0fdfbe2e9eae5c7e093c5a23b202dae8 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 29 Sep 2020 19:11:10 +0200 Subject: Norm update --- libft/src/ft_memcpy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libft/src/ft_memcpy.c') diff --git a/libft/src/ft_memcpy.c b/libft/src/ft_memcpy.c index 1357f2e..92abc47 100644 --- a/libft/src/ft_memcpy.c +++ b/libft/src/ft_memcpy.c @@ -14,8 +14,7 @@ #include #include -void - *ft_memcpy(void *dst, const void *src, size_t n) +void *ft_memcpy(void *dst, const void *src, size_t n) { unsigned char *dst_ptr; unsigned char *src_ptr; @@ -25,7 +24,9 @@ void src_ptr = (unsigned char*)src; i = 0; if (src_ptr == NULL && dst_ptr == NULL && n != 0) + { return (NULL); + } while (i < n) { dst_ptr[i] = src_ptr[i]; -- cgit v1.2.3