diff options
| author | = | 2022-05-06 20:44:32 +0200 |
|---|---|---|
| committer | = | 2022-05-06 20:44:32 +0200 |
| commit | 1b7112cd1a6ebbd47a2220dc779e8924b9ffa9cc (patch) | |
| tree | 6ffdadb21b2b33cb24657901eda8c86a79953222 /src/str.c | |
| parent | c8aa0e39e6a46ec5dc5bb0cb1a84821a8ea8b825 (diff) | |
| download | soikk-DB-1b7112cd1a6ebbd47a2220dc779e8924b9ffa9cc.tar.xz soikk-DB-1b7112cd1a6ebbd47a2220dc779e8924b9ffa9cc.tar.zst | |
Improved sameStr by removing an unnecessary check
Diffstat (limited to 'src/str.c')
| -rw-r--r-- | src/str.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 +} |
