summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_memchr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libft/src/ft_memchr.c5
1 files changed, 3 insertions, 2 deletions
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 <stddef.h>
-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--;
}