c->dst = j;
} else {
const char *last_space;
- last_space = strrchr(p, ' ');
-
- if (last_space != NULL) {
- const char *timezone = last_space + 1;
- if (timezone_is_valid(timezone)) {
- c->timezone = strdup(timezone);
- if (!c->timezone) {
- r = -ENOMEM;
- goto fail;
- }
- p = strndupa(p, last_space - p);
+ last_space = strrchr(p, ' ');
+ if (last_space != NULL && timezone_is_valid(last_space + 1)) {
+ c->timezone = strdup(last_space + 1);
+ if (!c->timezone) {
+ r = -ENOMEM;
+ goto fail;
}
+
+ p = strndupa(p, last_space - p);
}
}
}
pid_t pid;
last_space = strrchr(t, ' ');
-
- if (last_space != NULL) {
- if (timezone_is_valid(last_space + 1)) {
- timezone = last_space + 1;
- }
- }
+ if (last_space != NULL && timezone_is_valid(last_space + 1))
+ timezone = last_space + 1;
if (timezone == NULL || endswith_no_case(t, " UTC"))
return parse_timestamp_impl(t, usec, false);