From 76752516633e5a1011a91e9982e622086bd7fba9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 20 Jun 2018 22:19:26 +0200 Subject: [PATCH] tree-wide: pass NULL arguments to manager_startup() directly, avoid declaring unneeded variables --- src/analyze/analyze-verify.c | 4 +--- src/test/test-cgroup-mask.c | 4 +--- src/test/test-engine.c | 4 +--- src/test/test-sched-prio.c | 4 +--- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/analyze/analyze-verify.c b/src/analyze/analyze-verify.c index ae39c3149f..1f33e560ac 100644 --- a/src/analyze/analyze-verify.c +++ b/src/analyze/analyze-verify.c @@ -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; diff --git a/src/test/test-cgroup-mask.c b/src/test/test-cgroup-mask.c index 06fd567738..d65959edf1 100644 --- a/src/test/test-cgroup-mask.c +++ b/src/test/test-cgroup-mask.c @@ -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); diff --git a/src/test/test-engine.c b/src/test/test-engine.c index f0b95a33e9..d072a15cb1 100644 --- a/src/test/test-engine.c +++ b/src/test/test-engine.c @@ -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); diff --git a/src/test/test-sched-prio.c b/src/test/test-sched-prio.c index 0ba28a931b..c986284155 100644 --- a/src/test/test-sched-prio.c +++ b/src/test/test-sched-prio.c @@ -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);