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