systemctl: use FOREACH_ARRAY and FOREACH_ELEMENT more

This commit is contained in:
Mike Yuan
2024-04-19 10:08:35 +08:00
parent 8c8687852a
commit 848cdaa6dd
2 changed files with 18 additions and 12 deletions
+2 -2
View File
@@ -64,8 +64,8 @@ int acquire_bus(BusFocus focus, sd_bus **ret) {
}
void release_busses(void) {
for (BusFocus w = 0; w < _BUS_FOCUS_MAX; w++)
buses[w] = sd_bus_flush_close_unref(buses[w]);
FOREACH_ARRAY(w, buses, _BUS_FOCUS_MAX)
*w = sd_bus_flush_close_unref(*w);
}
void ask_password_agent_open_maybe(void) {