commit | d60f95137e9e0e705f81668af0a4ad14f5ab48b5 | [log] [tgz] |
---|---|---|
author | Benno Schulenberg <bensberg@justemail.net> | Wed Jul 27 21:54:16 2016 +0200 |
committer | Benno Schulenberg <bensberg@justemail.net> | Thu Aug 04 13:40:19 2016 +0200 |
tree | d15ee2b18e1e59fae0b77e26562110e7595505a8 | |
parent | 14ac47517bf1005d1d1d1bc78b31de7f2c851bac [diff] |
chars: remove a special case that never occurs The needle is never part of the hay -- it is always a separate string. (And even if needle and haystack were identical, the routine works fine, the case does not need special treatment.)
diff --git a/src/chars.c b/src/chars.c index 2c3c203..e861c93 100644 --- a/src/chars.c +++ b/src/chars.c
@@ -510,9 +510,6 @@ if (use_utf8) { wchar_t wc1, wc2; - if (s1 == s2) - return 0; - assert(s1 != NULL && s2 != NULL); for (; *s1 != '\0' && *s2 != '\0' && n > 0;