aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-06-20 22:19:26 +0200
committerLennart Poettering <lennart@poettering.net>2018-06-20 23:59:29 +0200
commit76752516633e5a1011a91e9982e622086bd7fba9 (patch)
tree7e1f48ceac2ad19d969ff7ea7da1c46e79577a7a
parentunits: let's use two ExecStart= lines instead of ; (diff)
downloadsystemd-76752516633e5a1011a91e9982e622086bd7fba9.tar.gz
systemd-76752516633e5a1011a91e9982e622086bd7fba9.tar.bz2
systemd-76752516633e5a1011a91e9982e622086bd7fba9.zip
tree-wide: pass NULL arguments to manager_startup() directly, avoid declaring unneeded variables
-rw-r--r--src/analyze/analyze-verify.c4
-rw-r--r--src/test/test-cgroup-mask.c4
-rw-r--r--src/test/test-engine.c4
-rw-r--r--src/test/test-sched-prio.c4
4 files changed, 4 insertions, 12 deletions
diff --git a/src/analyze/analyze-verify.c b/src/analyze/analyze-verify.c
index ae39c3149..1f33e560a 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 06fd56773..d65959edf 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 f0b95a33e..d072a15cb 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 0ba28a931..c98628415 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);