diff options
author | John Hawthorn <john@hawthorn.email> | 2019-12-27 17:49:38 -0800 |
---|---|---|
committer | John Hawthorn <john@hawthorn.email> | 2019-12-27 18:44:41 -0800 |
commit | 2afbce950e820f6d1f479f5809149390a59db76a (patch) | |
tree | 5e4688b35f0dd0363468583d2f3f9ba516415a40 | |
parent | 8402394d36ef7b1a1617bb683a897bb74d016d7c (diff) |
Combine early-return if as else if
-rw-r--r-- | src/match.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/match.c b/src/match.c index 8a71df9..c028b87 100644 --- a/src/match.c +++ b/src/match.c @@ -83,9 +83,7 @@ score_t match_positions(const char *needle, const char *haystack, size_t *positi * just be ranked below any reasonably sized candidates */ return SCORE_MIN; - } - - if (n == m) { + } else if (n == m) { /* Since this method can only be called with a haystack which * matches needle. If the lengths of the strings are equal the * strings themselves must also be equal (ignoring case). |