From efe895b1793a20171f70ca0781a5194caa3f17d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 17 Sep 2017 09:10:03 +0200 Subject: [PATCH] Simplify the if cases for timezone checking Just to reduce the indentation a bit. --- src/basic/time-util.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/basic/time-util.c b/src/basic/time-util.c index 4b2b4f035..c1621df96 100644 --- a/src/basic/time-util.c +++ b/src/basic/time-util.c @@ -904,12 +904,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); -- 2.30.2