sd-bus: Remove bus arg from bus_verify_polkit_async_registry_free()
It's unneccessary, not used, and complicates callers of the function.
This commit is contained in:
parent
926446f4aa
commit
36e34057a2
|
@ -68,11 +68,11 @@ static void context_reset(Context *c) {
|
|||
}
|
||||
}
|
||||
|
||||
static void context_free(Context *c, sd_bus *bus) {
|
||||
static void context_free(Context *c) {
|
||||
assert(c);
|
||||
|
||||
context_reset(c);
|
||||
bus_verify_polkit_async_registry_free(bus, c->polkit_registry);
|
||||
bus_verify_polkit_async_registry_free(c->polkit_registry);
|
||||
}
|
||||
|
||||
static int context_read_data(Context *c) {
|
||||
|
@ -721,7 +721,7 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
finish:
|
||||
context_free(&context, bus);
|
||||
context_free(&context);
|
||||
|
||||
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -452,7 +452,7 @@ int bus_verify_polkit_async(
|
|||
return -EACCES;
|
||||
}
|
||||
|
||||
void bus_verify_polkit_async_registry_free(sd_bus *bus, Hashmap *registry) {
|
||||
void bus_verify_polkit_async_registry_free(Hashmap *registry) {
|
||||
#ifdef ENABLE_POLKIT
|
||||
AsyncPolkitQuery *q;
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ int bus_check_peercred(sd_bus *c);
|
|||
int bus_verify_polkit(sd_bus *bus, sd_bus_message *m, const char *action, bool interactive, bool *_challenge, sd_bus_error *e);
|
||||
|
||||
int bus_verify_polkit_async(sd_bus *bus, Hashmap **registry, sd_bus_message *m, const char *action, bool interactive, sd_bus_error *error, sd_bus_message_handler_t callback, void *userdata);
|
||||
void bus_verify_polkit_async_registry_free(sd_bus *bus, Hashmap *registry);
|
||||
void bus_verify_polkit_async_registry_free(Hashmap *registry);
|
||||
|
||||
int bus_open_system_systemd(sd_bus **_bus);
|
||||
int bus_open_user_systemd(sd_bus **_bus);
|
||||
|
|
|
@ -131,12 +131,12 @@ static void context_free_locale(Context *c) {
|
|||
free_and_replace(&c->locale[p], NULL);
|
||||
}
|
||||
|
||||
static void context_free(Context *c, sd_bus *bus) {
|
||||
static void context_free(Context *c) {
|
||||
context_free_locale(c);
|
||||
context_free_x11(c);
|
||||
context_free_vconsole(c);
|
||||
|
||||
bus_verify_polkit_async_registry_free(bus, c->polkit_registry);
|
||||
bus_verify_polkit_async_registry_free(c->polkit_registry);
|
||||
};
|
||||
|
||||
static void locale_simplify(Context *c) {
|
||||
|
@ -1160,7 +1160,7 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
finish:
|
||||
context_free(&context, bus);
|
||||
context_free(&context);
|
||||
|
||||
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ void manager_free(Manager *m) {
|
|||
if (m->udev)
|
||||
udev_unref(m->udev);
|
||||
|
||||
bus_verify_polkit_async_registry_free(m->bus, m->polkit_registry);
|
||||
bus_verify_polkit_async_registry_free(m->polkit_registry);
|
||||
|
||||
sd_bus_unref(m->bus);
|
||||
sd_event_unref(m->event);
|
||||
|
|
|
@ -52,11 +52,11 @@ typedef struct Context {
|
|||
Hashmap *polkit_registry;
|
||||
} Context;
|
||||
|
||||
static void context_free(Context *c, sd_bus *bus) {
|
||||
static void context_free(Context *c) {
|
||||
assert(c);
|
||||
|
||||
free(c->zone);
|
||||
bus_verify_polkit_async_registry_free(bus, c->polkit_registry);
|
||||
bus_verify_polkit_async_registry_free(c->polkit_registry);
|
||||
}
|
||||
|
||||
static int context_read_data(Context *c) {
|
||||
|
@ -727,7 +727,7 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
finish:
|
||||
context_free(&context, bus);
|
||||
context_free(&context);
|
||||
|
||||
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue