summaryrefslogtreecommitdiff
path: root/src/shared/calendarspec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/calendarspec.c')
-rw-r--r--src/shared/calendarspec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/calendarspec.c b/src/shared/calendarspec.c
index cc680779b5..13f70d8e72 100644
--- a/src/shared/calendarspec.c
+++ b/src/shared/calendarspec.c
@@ -391,7 +391,7 @@ static int prepend_component(const char **p, CalendarComponent **c) {
errno = 0;
value = strtoul(*p, &e, 10);
- if (errno != 0)
+ if (errno > 0)
return -errno;
if (e == *p)
return -EINVAL;
@@ -400,7 +400,7 @@ static int prepend_component(const char **p, CalendarComponent **c) {
if (*e == '/') {
repeat = strtoul(e+1, &ee, 10);
- if (errno != 0)
+ if (errno > 0)
return -errno;
if (ee == e+1)
return -EINVAL;