summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/cgroup.c2
-rw-r--r--src/systemctl/systemctl.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index a7263855dc..0c885d5744 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -1378,6 +1378,8 @@ static CGroupMask unit_get_cgroup_mask(Unit *u) {
c = unit_get_cgroup_context(u);
+ assert(c);
+
/* Figure out which controllers we need, based on the cgroup context object */
if (c->cpu_accounting)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index e043afc4f2..1158914fb4 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1942,7 +1942,7 @@ static void output_machines_list(struct machine_info *machine_infos, unsigned n)
statelen = STRLEN("STATE"),
failedlen = STRLEN("FAILED"),
jobslen = STRLEN("JOBS");
- bool state_missing;
+ bool state_missing = false;
assert(machine_infos || n == 0);