logind: place 'ret' param at last

Follow-up to 2454cee32e
This commit is contained in:
Antonio Alvarez Feijoo
2024-03-12 10:39:08 +01:00
parent 5d789ba5a6
commit 26ed3ecfe0
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -221,7 +221,7 @@ int manager_add_inhibitor(Manager *m, const char* id, Inhibitor **ret) {
i = hashmap_get(m->inhibitors, id);
if (!i) {
r = inhibitor_new(&i, m, id);
r = inhibitor_new(m, id, &i);
if (r < 0)
return r;
}
+2 -2
View File
@@ -29,13 +29,13 @@
static void inhibitor_remove_fifo(Inhibitor *i);
int inhibitor_new(Inhibitor **ret, Manager *m, const char* id) {
int inhibitor_new(Manager *m, const char* id, Inhibitor **ret) {
_cleanup_(inhibitor_freep) Inhibitor *i = NULL;
int r;
assert(ret);
assert(m);
assert(id);
assert(ret);
i = new(Inhibitor, 1);
if (!i)
+1 -1
View File
@@ -51,7 +51,7 @@ struct Inhibitor {
int fifo_fd;
};
int inhibitor_new(Inhibitor **ret, Manager *m, const char* id);
int inhibitor_new(Manager *m, const char* id, Inhibitor **ret);
Inhibitor* inhibitor_free(Inhibitor *i);
DEFINE_TRIVIAL_CLEANUP_FUNC(Inhibitor*, inhibitor_free);