From 1b7112cd1a6ebbd47a2220dc779e8924b9ffa9cc Mon Sep 17 00:00:00 2001 From: = Date: Fri, 6 May 2022 20:44:32 +0200 Subject: Improved sameStr by removing an unnecessary check --- src/str.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/str.c') diff --git a/src/str.c b/src/str.c index 9cf5685..ef2edad 100644 --- a/src/str.c +++ b/src/str.c @@ -9,7 +9,7 @@ uint16_t len(const char *s){ bool sameStr(const char *s1, const char *s2){ uint16_t i1 = 0, i2 = 0; - while(s1[i1] && s2[i2] && s1[i1] == s2[i2]) + while(s1[i1] && s1[i1] == s2[i2]) ++i1, ++i2; return !s1[i1] && !s2[i2]; } @@ -56,4 +56,4 @@ ssize_t strInTags(const char *tags, int n, const char *ndl, int m, char sep){ } } return -1; -} \ No newline at end of file +} -- cgit v1.2.3