summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRonny Chevalier <chevalier.ronny@gmail.com>2014-11-30 02:33:35 +0100
committerRonny Chevalier <chevalier.ronny@gmail.com>2014-11-30 02:35:56 +0100
commit4e2744fcb579f5314043c0045e6902c64b7efe67 (patch)
treebc8bbbc0a5aad4d5a78ee9d3fcba5cf7afd6fb48 /src
parent82b1412852b70d240a2a7b6ffd134776bd246642 (diff)
core: remove unused variables
Diffstat (limited to 'src')
-rw-r--r--src/core/load-fragment.c2
-rw-r--r--src/core/scope.c7
2 files changed, 3 insertions, 6 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 4309121649..64f7fa6d7b 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -2487,7 +2487,6 @@ int config_parse_address_families(
void *userdata) {
ExecContext *c = data;
- Unit *u = userdata;
bool invert = false;
const char *word, *state;
size_t l;
@@ -2496,7 +2495,6 @@ int config_parse_address_families(
assert(filename);
assert(lvalue);
assert(rvalue);
- assert(u);
if (isempty(rvalue)) {
/* Empty assignment resets the list */
diff --git a/src/core/scope.c b/src/core/scope.c
index d33b891956..f0efec0516 100644
--- a/src/core/scope.c
+++ b/src/core/scope.c
@@ -382,15 +382,14 @@ static int scope_deserialize_item(Unit *u, const char *key, const char *value, F
}
static bool scope_check_gc(Unit *u) {
- Scope *s = SCOPE(u);
- int r;
-
- assert(s);
+ assert(u);
/* Never clean up scopes that still have a process around,
* even if the scope is formally dead. */
if (u->cgroup_path) {
+ int r;
+
r = cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, u->cgroup_path, true);
if (r <= 0)
return true;