Blame SOURCES/0555-sd-event-follow-coding-style-with-naming-return-para.patch
|
|
592caf |
From 846b1dd75e626ad2e2483673eea65774edea9016 Mon Sep 17 00:00:00 2001
|
|
|
592caf |
From: Lennart Poettering <lennart@poettering.net>
|
|
|
592caf |
Date: Mon, 23 Nov 2020 17:47:16 +0100
|
|
|
592caf |
Subject: [PATCH] sd-event: follow coding style with naming return parameter
|
|
|
592caf |
|
|
|
592caf |
(cherry picked from commit cad143a8f26976a23e634d5e1ecfb7d7ba75c3bf)
|
|
|
592caf |
|
|
|
592caf |
Related: #1819868
|
|
|
592caf |
---
|
|
|
592caf |
src/libsystemd/sd-event/sd-event.c | 9 +++++----
|
|
|
592caf |
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
592caf |
|
|
|
592caf |
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
|
|
|
592caf |
index be1e6e5f53..739296abcf 100644
|
|
|
592caf |
--- a/src/libsystemd/sd-event/sd-event.c
|
|
|
592caf |
+++ b/src/libsystemd/sd-event/sd-event.c
|
|
|
592caf |
@@ -2285,13 +2285,14 @@ fail:
|
|
|
592caf |
return r;
|
|
|
592caf |
}
|
|
|
592caf |
|
|
|
592caf |
-_public_ int sd_event_source_get_enabled(sd_event_source *s, int *m) {
|
|
|
592caf |
+_public_ int sd_event_source_get_enabled(sd_event_source *s, int *ret) {
|
|
|
592caf |
assert_return(s, -EINVAL);
|
|
|
592caf |
- assert_return(m, -EINVAL);
|
|
|
592caf |
assert_return(!event_pid_changed(s->event), -ECHILD);
|
|
|
592caf |
|
|
|
592caf |
- *m = s->enabled;
|
|
|
592caf |
- return 0;
|
|
|
592caf |
+ if (ret)
|
|
|
592caf |
+ *ret = s->enabled;
|
|
|
592caf |
+
|
|
|
592caf |
+ return s->enabled != SD_EVENT_OFF;
|
|
|
592caf |
}
|
|
|
592caf |
|
|
|
592caf |
static int event_source_disable(sd_event_source *s) {
|