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_memcmp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libft/src/ft_memcmp.c') diff --git a/libft/src/ft_memcmp.c b/libft/src/ft_memcmp.c index 39fbdf6..5e1a0e9 100644 --- a/libft/src/ft_memcmp.c +++ b/libft/src/ft_memcmp.c @@ -12,15 +12,14 @@ #include -int - ft_memcmp(const void *s1, const void *s2, size_t n) +int ft_memcmp(const void *s1, const void *s2, size_t n) { const unsigned char *s1_ptr; const unsigned char *s2_ptr; s1_ptr = (unsigned char*)s1; s2_ptr = (unsigned char*)s2; - while (n) + while (n != 0) { if (*s1_ptr != *s2_ptr) return (*s1_ptr - *s2_ptr); -- cgit v1.2.3