aboutsummaryrefslogtreecommitdiff
path: root/src/str/ft_strcmp.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-08-02 11:05:33 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-08-02 11:05:33 +0200
commit5d2f925b20ceaea4122c59d2d2c4e7d4ae991fde (patch)
tree80911dc3c32e9f230750e7e1042d413dfb6efab2 /src/str/ft_strcmp.c
parentee32953ea79616e72f5428cdf40c834714a891c9 (diff)
parentb96b82194ccad2cddbb46b77aa1962a57c47ff44 (diff)
downloadlibft-5d2f925b20ceaea4122c59d2d2c4e7d4ae991fde.tar.gz
libft-5d2f925b20ceaea4122c59d2d2c4e7d4ae991fde.tar.bz2
libft-5d2f925b20ceaea4122c59d2d2c4e7d4ae991fde.zip
Merge branch 'master' into ft_ssl
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));
}