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_memchr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libft/src/ft_memchr.c') diff --git a/libft/src/ft_memchr.c b/libft/src/ft_memchr.c index 8917427..b85da16 100644 --- a/libft/src/ft_memchr.c +++ b/libft/src/ft_memchr.c @@ -12,8 +12,7 @@ #include -void - *ft_memchr(const void *s, int c, size_t n) +void *ft_memchr(const void *s, int c, size_t n) { unsigned char *s_ptr; unsigned char c_char; @@ -23,7 +22,9 @@ void while (n > 0) { if (*s_ptr == c_char) + { return ((void*)s_ptr); + } s_ptr++; n--; } -- cgit v1.2.3