summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2015-04-29 21:29:18 +0300
committerTom Gundersen <teg@jklm.no>2015-04-29 20:38:48 +0200
commitcfa9677bd164574600d29a9bf99f9d1f28a7a170 (patch)
treea6dced6bb094c4e0a00b08cdd3a45bce069e436d /src/core/manager.c
parent966c66e34940001a40806142ecebaae61b478444 (diff)
core: fix event source annotations
These looked like a mass-replace gone slightly wrong – two statements with no { }'s, and no error checking.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 0c94e9ef10..cf7337eff5 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -90,6 +90,7 @@ static void manager_undo_generators(Manager *m);
static void manager_watch_jobs_in_progress(Manager *m) {
usec_t next;
+ int r;
assert(m);
@@ -97,12 +98,14 @@ static void manager_watch_jobs_in_progress(Manager *m) {
return;
next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_WAIT_USEC;
- (void) sd_event_add_time(
+ r = sd_event_add_time(
m->event,
&m->jobs_in_progress_event_source,
CLOCK_MONOTONIC,
next, 0,
manager_dispatch_jobs_in_progress, m);
+ if (r < 0)
+ return;
(void) sd_event_source_set_description(m->jobs_in_progress_event_source, "manager-jobs-in-progress");
}