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