systemctl: fix assert for failed mktime conversion

mktime returns -1 on error, so checking for != 0 is not useful.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-07-04 23:54:43 +02:00
parent df8701a3f2
commit 855a86a349
+2 -1
View File
@@ -7823,7 +7823,8 @@ static int parse_shutdown_time_spec(const char *t, usec_t *_u) {
tm.tm_min = (int) minute;
tm.tm_sec = 0;
assert_se(s = mktime(&tm));
s = mktime(&tm);
assert(s >= 0);
*_u = (usec_t) s * USEC_PER_SEC;