mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
tree-wide: pass NULL arguments to manager_startup() directly, avoid declaring unneeded variables
This commit is contained in:
parent
6133af6030
commit
7675251663
@ -229,8 +229,6 @@ static int verify_unit(Unit *u, bool check_man) {
|
||||
int verify_units(char **filenames, UnitFileScope scope, bool check_man, bool run_generators) {
|
||||
_cleanup_free_ char *var = NULL;
|
||||
Manager *m = NULL;
|
||||
FILE *serial = NULL;
|
||||
FDSet *fdset = NULL;
|
||||
char **filename;
|
||||
int r = 0, k;
|
||||
|
||||
@ -256,7 +254,7 @@ int verify_units(char **filenames, UnitFileScope scope, bool check_man, bool run
|
||||
|
||||
log_debug("Starting manager...");
|
||||
|
||||
r = manager_startup(m, serial, fdset);
|
||||
r = manager_startup(m, NULL, NULL);
|
||||
if (r < 0) {
|
||||
log_error_errno(r, "Failed to start manager: %m");
|
||||
goto finish;
|
||||
|
@ -17,8 +17,6 @@ static int test_cgroup_mask(void) {
|
||||
_cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL;
|
||||
_cleanup_(manager_freep) Manager *m = NULL;
|
||||
Unit *son, *daughter, *parent, *root, *grandchild, *parent_deep;
|
||||
FILE *serial = NULL;
|
||||
FDSet *fdset = NULL;
|
||||
int r;
|
||||
|
||||
r = enter_cgroup_subroot();
|
||||
@ -48,7 +46,7 @@ static int test_cgroup_mask(void) {
|
||||
m->default_tasks_max = (uint64_t) -1;
|
||||
|
||||
assert_se(r >= 0);
|
||||
assert_se(manager_startup(m, serial, fdset) >= 0);
|
||||
assert_se(manager_startup(m, NULL, NULL) >= 0);
|
||||
|
||||
/* Load units and verify hierarchy. */
|
||||
assert_se(manager_load_startable_unit_or_warn(m, "parent.slice", NULL, &parent) >= 0);
|
||||
|
@ -15,8 +15,6 @@ int main(int argc, char *argv[]) {
|
||||
_cleanup_(sd_bus_error_free) sd_bus_error err = SD_BUS_ERROR_NULL;
|
||||
_cleanup_(manager_freep) Manager *m = NULL;
|
||||
Unit *a = NULL, *b = NULL, *c = NULL, *d = NULL, *e = NULL, *g = NULL, *h = NULL, *unit_with_multiple_dashes = NULL;
|
||||
FILE *serial = NULL;
|
||||
FDSet *fdset = NULL;
|
||||
Job *j;
|
||||
int r;
|
||||
|
||||
@ -39,7 +37,7 @@ int main(int argc, char *argv[]) {
|
||||
return EXIT_TEST_SKIP;
|
||||
}
|
||||
assert_se(r >= 0);
|
||||
assert_se(manager_startup(m, serial, fdset) >= 0);
|
||||
assert_se(manager_startup(m, NULL, NULL) >= 0);
|
||||
|
||||
printf("Load1:\n");
|
||||
assert_se(manager_load_startable_unit_or_warn(m, "a.service", NULL, &a) >= 0);
|
||||
|
@ -17,8 +17,6 @@ int main(int argc, char *argv[]) {
|
||||
_cleanup_(manager_freep) Manager *m = NULL;
|
||||
Unit *idle_ok, *idle_bad, *rr_ok, *rr_bad, *rr_sched;
|
||||
Service *ser;
|
||||
FILE *serial = NULL;
|
||||
FDSet *fdset = NULL;
|
||||
int r;
|
||||
|
||||
r = enter_cgroup_subroot();
|
||||
@ -36,7 +34,7 @@ int main(int argc, char *argv[]) {
|
||||
return EXIT_TEST_SKIP;
|
||||
}
|
||||
assert_se(r >= 0);
|
||||
assert_se(manager_startup(m, serial, fdset) >= 0);
|
||||
assert_se(manager_startup(m, NULL, NULL) >= 0);
|
||||
|
||||
/* load idle ok */
|
||||
assert_se(manager_load_startable_unit_or_warn(m, "sched_idle_ok.service", NULL, &idle_ok) >= 0);
|
||||
|
Loading…
Reference in New Issue
Block a user