projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea3894c
)
util-lib: fix returned error code
author
Lennart Poettering
<lennart@poettering.net>
Sun, 21 Feb 2016 22:27:20 +0000
(23:27 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Sun, 21 Feb 2016 22:27:20 +0000
(23:27 +0100)
Make sure we propagate errors properly.
src/basic/calendarspec.c
patch
|
blob
|
history
diff --git
a/src/basic/calendarspec.c
b/src/basic/calendarspec.c
index 07315d73e8aed5b7bc0dbec99cc11723bfb11a97..00fc39a499b8013127c2fbad6628b178f8503cb8 100644
(file)
--- a/
src/basic/calendarspec.c
+++ b/
src/basic/calendarspec.c
@@
-990,8
+990,10
@@
static int find_next(const CalendarSpec *spec, struct tm *tm, usec_t *usec) {
c.tm_mday = 1;
c.tm_hour = c.tm_min = c.tm_sec = tm_usec = 0;
}
- if (r < 0
|| tm_out_of_bounds(&c, spec->utc)
)
+ if (r < 0)
return r;
+ if (tm_out_of_bounds(&c, spec->utc))
+ return -ENOENT;
c.tm_mon += 1;
r = find_matching_component(spec->month, &c.tm_mon);