aboutsummaryrefslogtreecommitdiff
path: root/src/str/ft_strcmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/str/ft_strcmp.c')
-rw-r--r--src/str/ft_strcmp.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/str/ft_strcmp.c b/src/str/ft_strcmp.c
index aced711..25d2972 100644
--- a/src/str/ft_strcmp.c
+++ b/src/str/ft_strcmp.c
@@ -14,10 +14,5 @@
int ft_strcmp(const char *s1, const char *s2)
{
- while (*s1 && *s2 && *s1 == *s2)
- {
- s1++;
- s2++;
- }
- return (*s1 - *s2);
+ return (ft_memcmp(s1, s2, ft_strlen(s1) + 1));
}