diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-07-16 15:59:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-16 15:59:31 +0200 |
commit | 4119ad492f09f44c1383187e7a77cd461815bcec (patch) | |
tree | a4c4924b1288bb24afc9dce3d47ed780d068ed99 /src | |
parent | 476da0fe00b863123461396d6acb403c92a806a5 (diff) | |
parent | 525e9b7991878ab448462ff20ab5d54960ecad01 (diff) | |
download | systemd-4119ad492f09f44c1383187e7a77cd461815bcec.tar.gz systemd-4119ad492f09f44c1383187e7a77cd461815bcec.tar.bz2 systemd-4119ad492f09f44c1383187e7a77cd461815bcec.zip |
Merge pull request #13073 from poettering/variety-galore
Variety galore
Diffstat (limited to 'src')
-rw-r--r-- | src/cryptsetup/cryptsetup-generator.c | 3 | ||||
-rw-r--r-- | src/shared/bus-unit-procs.c | 8 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c index 127b3c5380..2197160c0f 100644 --- a/src/cryptsetup/cryptsetup-generator.c +++ b/src/cryptsetup/cryptsetup-generator.c @@ -369,9 +369,6 @@ static crypto_device *get_crypto_device(const char *uuid) { if (!d) return NULL; - d->create = false; - d->keyfile = d->options = d->name = NULL; - d->uuid = strdup(uuid); if (!d->uuid) return mfree(d); diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c index 054a1410ac..b21fe39326 100644 --- a/src/shared/bus-unit-procs.c +++ b/src/shared/bus-unit-procs.c @@ -31,8 +31,7 @@ static int add_cgroup(Hashmap *cgroups, const char *path, bool is_const, struct assert(cgroups); assert(ret); - if (empty_or_root(path)) - path = "/"; + path = empty_to_root(path); cg = hashmap_get(cgroups, path); if (cg) { @@ -48,8 +47,6 @@ static int add_cgroup(Hashmap *cgroups, const char *path, bool is_const, struct return -EINVAL; pp = strndupa(path, e - path); - if (!pp) - return -ENOMEM; r = add_cgroup(cgroups, pp, false, &parent); if (r < 0) @@ -150,8 +147,7 @@ static int dump_processes( assert(prefix); - if (empty_or_root(cgroup_path)) - cgroup_path = "/"; + cgroup_path = empty_to_root(cgroup_path); cg = hashmap_get(cgroups, cgroup_path); if (!cg) |