From: Ralph Corderoy Date: Thu, 20 Oct 2016 22:16:21 +0000 (+0100) Subject: Don't `else' after return. Simplify control flow. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/c6b3a45192568ef4679d9ca32af1806522bd295c?ds=inline Don't `else' after return. Simplify control flow. --- diff --git a/sbr/datetime.c b/sbr/datetime.c index 8478414e..fb7f7c29 100644 --- a/sbr/datetime.c +++ b/sbr/datetime.c @@ -143,9 +143,9 @@ parse_datetime (const char *datetime, const char *zone, int dst, } return OK; - } else { - return NOTOK; } + + return NOTOK; } tzdesc_t @@ -359,10 +359,9 @@ format_datetime (tzdesc_t timezones, const contentline *node) { Form #2: DATE WITH UTC TIME */ if (parse_datetime (node->value, NULL, 0, &tws[0]) == OK) { return strdup (dasctime (&tws[0], 0)); - } else { - advise (NULL, "unable to parse datetime %s", node->value); - return NULL; } + advise (NULL, "unable to parse datetime %s", node->value); + return NULL; } /*