Simplify the if cases for timezone checking

Just to reduce the indentation a bit.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-09-17 09:42:20 +02:00
parent 48d26c0164
commit a2932a0d1a
2 changed files with 10 additions and 17 deletions
+2 -6
View File
@@ -891,12 +891,8 @@ int parse_timestamp(const char *t, usec_t *usec) {
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);