diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-23 10:32:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-07-23 16:08:06 +0200 |
commit | 290320effadc0a988524af7e88a70c064e6e602c (patch) | |
tree | 7013d79cb07f3a0fbdf30046fca7636821bb655b /src/login/logind-inhibit.c | |
parent | 81280b2a6fbad079b5d72f48160bf1d492cc8e57 (diff) | |
download | systemd-290320effadc0a988524af7e88a70c064e6e602c.tar.gz |
logind: un-export and voidify a few functions
Let's minimize scope of functions and make sure that functions that
semantically should never fail can't return errors.
Diffstat (limited to 'src/login/logind-inhibit.c')
-rw-r--r-- | src/login/logind-inhibit.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c index 11cbb4534c..ca2088150e 100644 --- a/src/login/logind-inhibit.c +++ b/src/login/logind-inhibit.c @@ -24,6 +24,8 @@ #include "user-util.h" #include "util.h" +static void inhibitor_remove_fifo(Inhibitor *i); + int inhibitor_new(Inhibitor **ret, Manager *m, const char* id) { _cleanup_(inhibitor_freep) Inhibitor *i = NULL; int r; @@ -79,7 +81,7 @@ Inhibitor* inhibitor_free(Inhibitor *i) { return mfree(i); } -int inhibitor_save(Inhibitor *i) { +static int inhibitor_save(Inhibitor *i) { _cleanup_free_ char *temp_path = NULL; _cleanup_fclose_ FILE *f = NULL; int r; @@ -186,7 +188,7 @@ int inhibitor_start(Inhibitor *i) { return 0; } -int inhibitor_stop(Inhibitor *i) { +void inhibitor_stop(Inhibitor *i) { assert(i); if (i->started) @@ -203,8 +205,6 @@ int inhibitor_stop(Inhibitor *i) { i->started = false; bus_manager_send_inhibited_change(i); - - return 0; } int inhibitor_load(Inhibitor *i) { @@ -338,7 +338,7 @@ int inhibitor_create_fifo(Inhibitor *i) { return r; } -void inhibitor_remove_fifo(Inhibitor *i) { +static void inhibitor_remove_fifo(Inhibitor *i) { assert(i); i->event_source = sd_event_source_unref(i->event_source); |