]> diplodocus.org Git - nmh/commitdiff
Don't `else' after return. Simplify control flow.
authorRalph Corderoy <ralph@inputplus.co.uk>
Thu, 20 Oct 2016 22:16:21 +0000 (23:16 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Thu, 20 Oct 2016 22:34:04 +0000 (23:34 +0100)
sbr/datetime.c

index 8478414..fb7f7c2 100644 (file)
@@ -143,9 +143,9 @@ parse_datetime (const char *datetime, const char *zone, int dst,
         }
 
         return OK;
         }
 
         return OK;
-    } else {
-        return NOTOK;
     }
     }
+
+    return NOTOK;
 }
 
 tzdesc_t
 }
 
 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));
            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;
     }
 
     /*
     }
 
     /*