From 2afbce950e820f6d1f479f5809149390a59db76a Mon Sep 17 00:00:00 2001 From: John Hawthorn Date: Fri, 27 Dec 2019 17:49:38 -0800 Subject: Combine early-return if as else if --- src/match.c | 4 +--- 1 file changed, 1 insertion(+), 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). -- cgit v1.2.3