chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cc980a
)
Simplify the if cases for timezone checking
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Sun, 17 Sep 2017 07:10:03 +0000
(09:10 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Sun, 17 Sep 2017 07:10:03 +0000
(09:10 +0200)
Just to reduce the indentation a bit.
src/basic/time-util.c
patch
|
blob
|
history
diff --git
a/src/basic/time-util.c
b/src/basic/time-util.c
index 4b2b4f03530fa3b37278473970628dcd3c482538..c1621df96e20d67e7b6566c0b3c10be771647bc7 100644
(file)
--- 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);