X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/012d05c2b62332eb400d66b806e48216d39358c6..cf57870921b26703aad420c6741c524b33736ff1:/sbr/datetime.c diff --git a/sbr/datetime.c b/sbr/datetime.c index 4fb7bac0..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 @@ -217,7 +217,7 @@ load_timezones (const contentline *clines) { ! strcasecmp ("VTIMEZONE", node->value)) { in_vtimezone = 1; - timezone = mh_xcalloc (1, sizeof (struct tzdesc)); + NEW0(timezone); if (timezones) { tzdesc_t 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; } /*