From: Ralph Corderoy Date: Thu, 20 Oct 2016 22:21:34 +0000 (+0100) Subject: Don't `else' after return. Simplify control flow. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/cec6ee584ab027c7c536fb0bb62e768b40a4e94c?ds=inline;hp=efd9eb997948888688184ea94bbcfbdc3cba44d3 Don't `else' after return. Simplify control flow. --- diff --git a/sbr/mf.c b/sbr/mf.c index fa281766..9e5cad8c 100644 --- a/sbr/mf.c +++ b/sbr/mf.c @@ -34,17 +34,18 @@ isfrom(const char *string) int lequal (const char *a, const char *b) { - for (; *a; a++, b++) + char c1, c2; + + for (; *a; a++, b++) { if (*b == 0) return FALSE; - else { - char c1 = islower ((unsigned char) *a) ? - toupper ((unsigned char) *a) : *a; - char c2 = islower ((unsigned char) *b) ? - toupper ((unsigned char) *b) : *b; - if (c1 != c2) - return FALSE; - } + c1 = islower ((unsigned char) *a) ? + toupper ((unsigned char) *a) : *a; + c2 = islower ((unsigned char) *b) ? + toupper ((unsigned char) *b) : *b; + if (c1 != c2) + return FALSE; + } return (*b == 0); }