summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2015-11-20 05:16:03 +0100
committerMartin Pitt <martin.pitt@ubuntu.com>2015-11-20 05:16:03 +0100
commitfd4f59076ec35cd20c3b424a41e405a1062fbe8d (patch)
treeafa86fead50940c0129d111060d0665d0d40e9df /src/libsystemd
parentc665ffa9b16d910fb6660e132f19ffc4e2537590 (diff)
parentdc83f27a7cf03757dec11a69ec18504ad4ea8f89 (diff)
Merge pull request #1964 from poettering/sd-event-man
Finish the documentation for sd-event.h
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-event/sd-event.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 700ac691b5..e8e3d7306f 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -437,7 +437,9 @@ fail:
}
_public_ sd_event* sd_event_ref(sd_event *e) {
- assert_return(e, NULL);
+
+ if (!e)
+ return NULL;
assert(e->n_ref >= 1);
e->n_ref++;
@@ -1339,7 +1341,9 @@ _public_ int sd_event_add_exit(
}
_public_ sd_event_source* sd_event_source_ref(sd_event_source *s) {
- assert_return(s, NULL);
+
+ if (!s)
+ return NULL;
assert(s->n_ref >= 1);
s->n_ref++;
@@ -2433,7 +2437,9 @@ _public_ int sd_event_prepare(sd_event *e) {
e->iteration++;
+ e->state = SD_EVENT_PREPARING;
r = event_prepare(e);
+ e->state = SD_EVENT_INITIAL;
if (r < 0)
return r;