summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index edd136addd..f7ae47e7c7 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -4629,11 +4629,11 @@ static int parse_time_spec(const char *t, usec_t *_u) {
errno = 0;
hour = strtol(t, &e, 10);
- if (errno != 0 || *e != ':' || hour < 0 || hour > 23)
+ if (errno > 0 || *e != ':' || hour < 0 || hour > 23)
return -EINVAL;
minute = strtol(e+1, &e, 10);
- if (errno != 0 || *e != 0 || minute < 0 || minute > 59)
+ if (errno > 0 || *e != 0 || minute < 0 || minute > 59)
return -EINVAL;
n = now(CLOCK_REALTIME);